diff --git a/apps/config_explorer/LICENSE b/apps/config_explorer/LICENSE new file mode 100755 index 00000000..1f84167c --- /dev/null +++ b/apps/config_explorer/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 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 Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are 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. + + 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + 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 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 work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 Affero 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 Affero 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 Affero 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. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + 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 AGPL, see +. \ No newline at end of file diff --git a/apps/config_explorer/README.md b/apps/config_explorer/README.md new file mode 100755 index 00000000..348410d2 --- /dev/null +++ b/apps/config_explorer/README.md @@ -0,0 +1,82 @@ +# Config Explorer + +![screenshot](static/screenshot.png) + +This app provides a modern editor interface for viewing and editing Splunk files. It has code completion and +tooltip hinting for '.conf' files (by loading the Splunk '.spec' files). The code gutter highlights if the +line can be found in the btool output or not. By default, the app is not able to save files, but this can +be enabled from the "Settings" link. As this app essentially provides unrestricted access to the Splunk files, +users must have "admin_all_objects" capability. The editor is Microsoft Monaco editor (Visual Studio Code). + +This app can optionally version control all changes by committing them to a git repository before and after +saving. To use this you need to have "git" installed (not provided by this app) and you need to setup a git +repository using the instructions below. + + +## Important warnings: + +* Don't use this app on Search Head clusters becuase it won't sync changes to cluster members. +* As a matter of fact, because this app allows changing files just like you are on the filesystem, it should be +used very carefully in any environment that you care about. +* This app does not automatically update the Splunk running config (well except for search-time properties which +Splunk does regularly re-read). +* There are no built-in restrictions on viewing secrets files or passwords. Don't make this app available to +users who should not see that sort of things. +* There are also no restrictions that prevent editing files in `default/` folders. You should follow normal Splunk +best practices and only edit the `/local/*.conf` files or files in `default/` if you are the developer of that app. +* This app inherits the permissions of the user account that is running Splunk. +* By the way, all Splunk apps inherit the permissions of the Splunk user and can do things without your knowing. If +you care about your Splunk instance, you should code review all apps before installing them. + + +There is some basic audit logging here: `index=_internal source="*config_explorer.log"` + + +Copyright (C) 2020 Chris Younger | [Source code](https://github.com/ChrisYounger/config_explorer) | [Feature requests and bugs](https://github.com/ChrisYounger/config_explorer/issues) | [Splunkbase](https://splunkbase.splunk.com/app/4353/) + + + +## Using git auto-commit +Before enabling the git auto-complete feature you must first create a git repository somewhere. For example: + +``` +$ cd /opt/splunk/etc +$ git init +``` + +You will probably also need to set a username and email address for config_explorer to use for commits: + +``` +git config user.name config_explorer +git config user.email config_explorer@splunk.acme.com +``` + +If you wish to use a non-standard git repository location, you can set these environment variables: + +``` +export GIT_DIR=/opt/splunk/.git/ +export GIT_WORK_TREE=/opt/splunk/ +``` + +You will need to consider your `.gitignore` file. If your directory already has `.gitignore` files in it, you +may instead need to make a `.gitignore` file that ignores deeper nested `.gitignore` files. + +Finally, if you want to push changes to an external repo, I would recommend you create a `script` input +to do so, or alternatively, see my custom git app here: https://splunkbase.splunk.com/app/4182/ + + +## Locking it down + +In order to prevent file editing semi-permanantly, set `write_access = false` and `hide_settings = true`. +This will prevent being able to change settings until someone changes files directly on the filesystem. + + +## Third party software + +The following third-party libraries are used by this app. Thank you! + +* Monaco Editor - MIT - https://github.com/Microsoft/monaco-editor +* Sortable - MIT - https://github.com/rubaxa/Sortable.git +* OverlayScrollbars - MIT - https://github.com/KingSora/OverlayScrollbars +* Illustration by Ouch.pics - https://icons8.com +* Font Awesome - CC BY 4.0 License - https://fontawesome.com/ diff --git a/apps/config_explorer/README/config_explorer.conf.spec b/apps/config_explorer/README/config_explorer.conf.spec new file mode 100644 index 00000000..80279ac3 --- /dev/null +++ b/apps/config_explorer/README/config_explorer.conf.spec @@ -0,0 +1,246 @@ +[global] +write_access = +* This enables saving, creating new files/folders, deleting and renaming. This + is obviously very dangerous and just like having filesystem access through + the operating system, will make it very easy to destroy your Splunk + environment if you dont know what you are doing. +* Defaults to false + +run_commands = +* Enables running commands in the shell, with the user that splunk runs as. + Use with caution. +* Defaults to false + +hide_settings = +* Hide the "Settings" link from the top of the screen. Note that if write_access + is true then settings can still be changed at + etc/apps/config_explorer/local/config_explorer.conf. When the Settings link + is displayed, it can be changed even when write_access is off. To + prevent all editing, set "hide_settings = true" and "write_access = false". +* Defaults to false. + +max_file_size = +* The maximum file size in megabytes (MB) that can be opened. +* Defaults to 10 + +cache_file_depth = +* Cache the list of files and folders for the left pane to this many levels deep. + This makes navigation much faster (especially on windows) but uses more memory, + causes slightly slower startup, and will not follow symbolic links. Set to 0 to + disable cache but allow caching of visited directories. Set -1 to disable all caching. +* Defaults to 6 + +conf_validate_on_save = +* Show a green or red indicator in the code gutter of each line if it appears + in the btool list output or not. As parsing .spec files is not particularly + reliable this can be wrong. +* Defaults to true + +conf_validate_on_save_exclusions = +* a pipe seperated list of btool config types that should not perform the gutter hints. +* If the 'btool list' output for a config type is very large, it will cause the web browser + to run out of memory and crash. +* Defaults to savedsearches + +git_autocommit = +* Track all file saves by automatically committing them to git with a generic message. + Note you must first configure the git repo using "git init". Please see the documentation. +* Defaults to false + +btool_dirs = +* this is now deprecated. See 'btool_dir_for_deployment_apps', 'btool_dir_for_master_apps' and 'btool_dir_for_shcluster_apps' below +* This has no effect + +btool_dir_for_deployment_apps = +* If this server is a deployment server, then set this property to a sym-linked copy of the deployment-apps folder. +* this will enable the btool gutter-hinting in config files to work with config in the deployment-apps folder +* perform these steps to create the sym-linked deployment-apps folder. Note this only works on *nix-based platforms +* 1. mkdir /opt/splunk/etc/deployment-apps-for-btool/ +* 2. cd /opt/splunk/etc/deployment-apps-for-btool/ +* 3. ln -s /opt/splunk/etc/deployment-apps apps +* 4. Set this parameter to: btool_dir_for_deployment_apps = /opt/splunk/etc/deployment-apps-for-btool +* For more info on why the symlinking process is necissary, please see: https://answers.splunk.com/answers/731787 + +btool_dir_for_master_apps = +* If this server is a cluster master server, then set this property to a sym-linked copy of the master-apps folder. +* this will enable the btool gutter-hinting in config files to work with config in the master-apps folder +* perform these steps to create the sym-linked master-apps folder. Note this only works on *nix-based platforms +* 1. mkdir /opt/splunk/etc/master-apps-for-btool/ +* 2. cd /opt/splunk/etc/master-apps-for-btool/ +* 3. ln -s /opt/splunk/etc/master-apps apps +* 4. Set this parameter to: btool_dir_for_master_apps = /opt/splunk/etc/master-apps-for-btool +* For more info on why the symlinking process is necissary, please see: https://answers.splunk.com/answers/731787 + +btool_dir_for_manager_apps = +* If this server is a cluster manager server, then set this property to a sym-linked copy of the manager-apps folder. +* this will enable the btool gutter-hinting in config files to work with config in the manager-apps folder +* perform these steps to create the sym-linked manager-apps folder. Note this only works on *nix-based platforms +* 1. mkdir /opt/splunk/etc/manager-apps-for-btool/ +* 2. cd /opt/splunk/etc/manager-apps-for-btool/ +* 3. ln -s /opt/splunk/etc/manager-apps apps +* 4. Set this parameter to: btool_dir_for_manager_apps = /opt/splunk/etc/manager-apps-for-btool +* For more info on why the symlinking process is necissary, please see: https://answers.splunk.com/answers/731787 + +btool_dir_for_shcluster_apps = +* This will enable the btool gutter-hinting in config files to work with config in the shcluster/apps folder +* Enable this if the current server is a search head deployer. +* There is no need to create a sym-link for this path, however an absolute path to shcluster must be set. +* e.g. /opt/splunk/etc/shcluster + +master_apps_gutter_unnecissary_config_files = +* When viewing a config file within a subfolder of the /master-apps/ folder, if it matches this pattern, then a grey indicator +* will be shown in the gutter with a tooltip that shows: "In most environments, this property is not needed on indexers". +* In many environments the following configs are not desired on Indexers and can be appended: |restmap|web|inputs +* Set empty to disable the gray gutter warnings of unnecissary props/transforms config +* Default: alert_actions|addon_builder|checklist|collections|datamodels|deploymentclient|distsearch|eventgen|eventtypes|macros|savedsearches|tags|times|wmi|workflow_actions + +master_apps_gutter_useful_props_and_transforms = +* When viewing a props or transforms config file within a subfolder of the /master-apps/ folder, if the property does not match +* this pattern, then a grey indicator will be shown in the gutter with a tooltip that shows: +* "In most environments, this property is not needed on indexers". +* Set empty to disable grey highlighting in props and transforms +* Default: priority|TRUNCATE|LINE_BREAKER|LINE_BREAKER_LOOKBEHIND|SHOULD_LINEMERGE|BREAK_ONLY_BEFORE_DATE|BREAK_ONLY_BEFORE|MUST_BREAK_AFTER|MUST_NOT_BREAK_AFTER|MUST_NOT_BREAK_BEFORE|DATETIME_CONFIG|TIME_PREFIX|MAX_TIMESTAMP_LOOKAHEAD|TIME_FORMAT|TZ|TZ_ALIAS|MAX_DAYS_AGO|MAX_DAYS_HENCE|MAX_DIFF_SECS_AGO|MAX_DIFF_SECS_HENCE|ADD_EXTRA_TIME_FIELDS|METRICS_PROTOCOL|STATSD-DIM-TRANSFORMS|TRANSFORMS|CHECK_FOR_HEADER|SEDCMD|SEGMENTATION|ANNOTATE_PUNCT|description|category|REGEX|FORMAT|MATCH_LIMIT|DEPTH_LIMIT|CLONE_SOURCETYPE|LOOKAHEAD|WRITE_META|DEST_KEY|DEFAULT_VALUE|SOURCE_KEY|REPEAT_MATCH|INGEST_EVAL|REGEX|REMOVE_DIMS_FROM_METRIC_NAME|METRIC + +master_apps_gutter_used_sourcetypes = +* Have you ever wondered if you have parsing stanzas in master-apps/*/*/props.conf that are not being used in your environment? +* Config Explorer can show an indicator in the gutter for stanzas that do not match the pattern defined here. +* This does not work on props stanzas like the following "[source::*", "[host::*", "[(*" +* Use the below search as an administraot to create the pattern: +* | metadata type=sourcetypes index=* index=_* | fields sourcetype | format "" "" "" "" "" "" | rex mode=sed field=search "s/\"\s+sourcetype=\"/|/g" | rex mode=sed field=search "s/(\s*sourcetype=|\s*$)//g" +* Set empty to disable grey highlighting of stanzas that are not used +* Defaults to empty + +master_apps_gutter_used_sourcetypes_date = +* As the above master_apps_gutter_used_sourcetypes pattern is a one-off snapshot in time, this property allows you to know +* "how out of date" the above pattern of known sourcetypes is. Must be in the format YYYY-MM-DD +* Set this to the current date when the above search is run. +* Defaults to empty + +detect_changed_files = +* Check if files that are open have changed on the filesystem and warn if so. +* Defaults to true + +rest_api_dashboard_list = +* Show a new "Splunk REST API" section in the left pane, which allows opening and saving dashboard XML files using the REST API. +* Defaults to false + +dashboard_xml_file_experimental_actions = +* Right-clicking on a dashboard XML file will show options to "Attempt view in browser" and "Attempt edit via REST API". +* When using one of these options its importent to understand that the file that opens might not be the exact file that was clicked on. +* For example if you click on a XML file in APP/default/data/ui/views/ and there is a file also in APP/local/data/ui/views/, then Splunk +* will open the "local" version. Private user dashboards may also take priority. Only enable this option if you understand this well. +* Defaults to false + +debug_refresh_endpoints = +* A list of endpoints that will show when you click the button "Debug/refresh endpoint" button on the config explorer home page. +* Set to a blank string to hide the button. Some Splunk TAs may add their own debug/refresh endpoints. + +############################################################################ +# Experimental features # +############################################################################ + +git_autocommit_show_output = +* When autocommit is enabled, when should we show the commit log + true = Always show git messages + false = Never show git output + auto = Only show git messages when there is a non-zero status code +* Defaults to auto + +git_autocommit_dir = +* Force specific git repository location, relative to SPLUNK_HOME directory. +* Defaults to empty, meaning normal git rules will apply (search up from current directory) + +git_autocommit_work_tree = +* Force root location from where changes are tracked, relative to SPLUNK_HOME directory + Set to "etc/" to track all changes beneath etc folder. +* Defaults to empty, meaning the normal git behavior will apply. + + +[hook] +* "[hook:]" +* The [hooks:...] stanza allows creation of custom right-click actions that can be quickly run from both + the editor and the file tree context menus. + +match = +* A regular expression matching the files that this action should apply to. + e.g. /(?:local|default))/[^\/]*\.conf$ + +matchtype = +* The type of tree element to match. Can be either "file", "folder", "conf" (the conf files screen). +* Default is "file" + +showInPane = +* Limit in which pane the right click hook will be displayed. Can be either "tree", "editor", "both" +* Default is "both" + +action = +* The action name to run, full colon, then the argument (if required). Example: "run:ls -l ${FILENAME}" +* The following actions currently exist: + run:(1) - Run a custom shell command. Requires that "run_commands=true". + run-safe:(1) - Run a custom shell command but first shows the prompt so it can be edited. Requires that "run_commands=true". + bump:(0) - Trigger the _bump endpoint to expire the cache.. + refresh:(1) - Trigger the specified debug/refresh endpoint. With no argument it will do all endpoints. + btool:(1) - Run btool on the specified conf file (--debug mode). + btool-hidepaths:(1) - Run btool on the specified conf file and do not show paths (not --debug mode). + btool-hidedefaults:(1) - Run btool on the specified conf file and hide any default setting. + btool-hidesystemdefaults:(1) - Run btool on the specified conf file and hide system default settings. + spec:(1) - Show the .spec file for the specified conf file. + read:(1) - Open the specified file. + live:(1) - Show the current running config for the specified conf file. Uses the "/services/configs/conf-*" endpoint. + live-diff:(1) - Show the current running config as a diff comparison of what is reported by btool. + cd:(1) - Change the current directory in config explorer to the path specified. Path should be relative to $SPLUNKHOME + clipboard:(1) - Copy the argument string to the clipboard + rest:(1) - attempt to open the resource using the Splunk REST API. The argument should be supplied as the REST API path + (example: "/servicesNS/nobody/search/data/ui/nav/my_dashboard"). Currently only works with views (dashboards). + openurl:(1) - Attempt to open the url argument in the browser +* The following variables can be used after the full colon: + ${FILE} = Filename with path + ${BASEFILE} = Filename without path + ${DIRNAME} = Full path to the containing folder + +label = +* Display label for the action. Variables can be used: ${FILE}, ${BASEFILE} and ${DIRNAME}. + +showWithSave = +* Show the action a second time in the editor context menu, prefixed with "Save and ...". Use this + when creation a hook that is often used after saving the file. +* Default true + +disabled = +* Enable or disable the hook. +* Defaults to false + +order = +* Sort order. Lower numbers are sorted and displayed first. +* Defaults to 10 + + +[action] +* "[action:]" +* The [action:...] stanza allows creation of actions that can be run from the home/star tab + +action = +* The action name to run, full colon, then the argument (if required). Example: "run:ls -l". +* See hooks section above for complete list of options (except without variable substitutions). +* In addition: +* There is a special option "action = heading" will render a heading row with the text of the label field. +* Useful for grouping actions, with careful use of the order= property. +* Be careful to make sure stanza names are unique. +* There is a special option "action = text" will render a text string with the text of the label field instead of a button. +* There is a special option "action = br" will render a
(line-break) tag. +* These commands always run from $SPLUNK_HOME +* The default "Developer options" buttons/actions (incl the heading) can be customised/removed by overriding their stanzas. + +label = +* Display label for the button. + +description = +* Text to show next to the button + +disabled = +* Enable or disable the hook. +* Defaults to false + +order = +* Sort order. Lower numbers are sorted and displayed first. +* Defaults to 10 diff --git a/apps/config_explorer/appserver/static/OverlayScrollbars.js b/apps/config_explorer/appserver/static/OverlayScrollbars.js new file mode 100755 index 00000000..304844bd --- /dev/null +++ b/apps/config_explorer/appserver/static/OverlayScrollbars.js @@ -0,0 +1,6098 @@ +/*! + * OverlayScrollbars + * https://github.com/KingSora/OverlayScrollbars + * + * Version: 1.5.3 + * + * Copyright KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + * Date: 07.11.2018 + */ + +(function (global, factory) { + if (typeof define === 'function' && define.amd) + define(function() { return factory(global, global.document, undefined); }); + else if (typeof module === 'object' && typeof module.exports === 'object') + module.exports = factory(global, global.document, undefined); + else + factory(global, global.document, undefined); +}(typeof window !== 'undefined' ? window : this, + function(window, document, undefined) { + 'use strict'; + var PLUGINNAME = 'OverlayScrollbars'; + var TYPES = { + o : 'object', + f : 'function', + a : 'array', + s : 'string', + b : 'boolean', + n : 'number', + u : 'undefined', + z : 'null' + //d : 'date', + //e : 'error', + //r : 'regexp', + //y : 'symbol' + }; + var LEXICON = { + c : 'class', + s : 'style', + i : 'id', + l : 'length', + p : 'prototype', + oH : 'offsetHeight', + cH : 'clientHeight', + sH : 'scrollHeight', + oW : 'offsetWidth', + cW : 'clientWidth', + sW : 'scrollWidth' + }; + var COMPATIBILITY = { + /** + * Gets the current window width. + * @returns {Number|number} The current window width in pixel. + */ + wW: function() { + return window.innerWidth || document.documentElement[LEXICON.cW] || document.body[LEXICON.cW]; + }, + + /** + * Gets the current window height. + * @returns {Number|number} The current window height in pixel. + */ + wH: function() { + return window.innerHeight || document.documentElement[LEXICON.cH] || document.body[LEXICON.cH]; + }, + + /** + * Gets the MutationObserver Object or undefined if not supported. + * @returns {MutationObserver|*|undefined} The MutationsObserver Object or undefined. + */ + mO: function() { + return window.MutationObserver || window.WebKitMutationObserver || window.WebkitMutationObserver || window.MozMutationObserver || undefined; + }, + + /** + * Gets the ResizeObserver Object or undefined if not supported. + * @returns {MutationObserver|*|undefined} The ResizeObserver Object or undefined. + */ + rO: function() { + return window.ResizeObserver || window.WebKitResizeObserver || window.WebkitResizeObserver || window.MozResizeObserver || undefined; + }, + + /** + * Gets the RequestAnimationFrame method or it's corresponding polyfill. + * @returns {*|Function} The RequestAnimationFrame method or it's corresponding polyfill. + */ + rAF: function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (func) { + return window.setTimeout(func, 1000 / 60); + }; + }, + + /** + * Gets the CancelAnimationFrame method or it's corresponding polyfill. + * @returns {*|Function} The CancelAnimationFrame method or it's corresponding polyfill. + */ + cAF: function() { + return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function (id) { + return window.clearTimeout(id); + }; + }, + + /** + * Gets the current time. + * @returns {number} The current time. + */ + now: function() { + return Date.now() || new Date().getTime(); + }, + + /** + * Stops the propagation of the given event. + * @param event The event of which the propagation shall be stoped. + */ + stpP: function(event) { + if(event.stopPropagation) + event.stopPropagation(); + else + event.cancelBubble = true; + }, + + /** + * Prevents the default action of the given event. + * @param event The event of which the default action shall be prevented. + */ + prvD: function(event) { + if(event.preventDefault && event.cancelable) + event.preventDefault(); + else + event.returnValue = false; + }, + + /** + * Gets the pageX and pageY values of the given mouse event. + * @param event The mouse event of which the pageX and pageX shall be got. + * @returns {x: number, y: number} x = pageX value, y = pageY value. + */ + page: function(event) { + event = event.originalEvent || event; + + var strPage = 'page'; + var strClient = 'client'; + var strX = 'X'; + var strY = 'Y'; + var target = event.target || event.srcElement || document; + var eventDoc = target.ownerDocument || document; + var doc = eventDoc.documentElement; + var body = eventDoc.body; + + //if touch event return return pageX/Y of it + if(event.touches !== undefined) { + var touch = event.touches[0]; + return { + x : touch[strPage + strX], + y : touch[strPage + strY] + } + } + + // Calculate pageX/Y if not native supported + if (!event[strPage + strX] && event[strClient + strX] && event[strClient + strX] != null) { + + return { + x : event[strClient + strX] + + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - + (doc && doc.clientLeft || body && body.clientLeft || 0), + y : event[strClient + strY] + + (doc && doc.scrollTop || body && body.scrollTop || 0) - + (doc && doc.clientTop || body && body.clientTop || 0) + } + } + return { + x : event[strPage + strX], + y : event[strPage + strY] + }; + }, + + /** + * Gets the clicked mouse button of the given mouse event. + * @param event The mouse event of which the clicked button shal be got. + * @returns {number} The number of the clicked mouse button. (1 : leftButton | 2 : middleButton | 3 : rightButton) + */ + mBtn: function(event) { + if (!event.which && event.button !== undefined) + return (event.button & 1 ? 1 : (event.button & 2 ? 3 : (event.button & 4 ? 2 : 0))); + else + return event.which; + }, + + /** + * Checks whether a item is in the given array and returns its index. + * @param item The item of which the position in the array shall be determined. + * @param arr The array. + * @returns {number} The zero based index of the item or -1 if the item isn't in the array. + */ + inA : function(item, arr) { + for (var i = 0; i < arr[LEXICON.l]; i++) + //Sometiems in IE a "SCRIPT70" Permission denied error occurs if HTML elements in a iFrame are compared + try { + if (arr[i] === item) + return i; + } + catch(e) { } + return -1; + }, + + /** + * Returns true if the given value is a array. + * @param arr The potential array. + * @returns {boolean} True if the given value is a array, false otherwise. + */ + isA: function(arr) { + var def = Array.isArray; + return def ? def(arr) : this.type(arr) == TYPES.a; + }, + + /** + * Determine the internal JavaScript [[Class]] of the given object. + * @param obj The object of which the type shall be determined. + * @returns {string} The type of the given object. + */ + type: function(obj) { + if (obj === undefined) + return obj + ""; + if (obj === null) + return obj + ""; + return Object[LEXICON.p].toString.call(obj).replace(/^\[object (.+)\]$/, '$1').toLowerCase(); + }, + + bind: function(func, thisObj) { + if (typeof func != TYPES.f) { + throw "Can't bind function!"; + // closest thing possible to the ECMAScript 5 + // internal IsCallable function + //throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); + } + var proto = LEXICON.p; + var aArgs = Array[proto].slice.call(arguments, 2); + var fNOP = function() {}; + var fBound = function() { return func.apply(this instanceof fNOP ? this : thisObj, aArgs.concat(Array[proto].slice.call(arguments))); }; + + if (func[proto]) + fNOP[proto] = func[proto]; // Function.prototype doesn't have a prototype property + fBound[proto] = new fNOP(); + + return fBound; + } + }; + + var JQUERY = window.jQuery; + var EASING = (function() { + var _math = window.Math; + var _easingsMath = { + p : _math.PI, + c : _math.cos, + s : _math.sin, + w : _math.pow, + t : _math.sqrt, + n : _math.asin, + a : _math.abs, + o : 1.70158 + }; + + /* + x : current percent (0 - 1), + t : current time (duration * percent), + b : start value (from), + c : end value (to), + d : duration + + easingName : function(x, t, b, c, d) { return easedValue; } + */ + + return { + swing: function (x, t, b, c, d) { + return 0.5 - _easingsMath.c(x * _easingsMath.p) / 2; + }, + linear: function(x, t, b, c, d) { + return x; + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + return ((t/=d/2) < 1) ? c/2*t*t + b : -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + return ((t/=d/2) < 1) ? c/2*t*t*t + b : c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + return ((t/=d/2) < 1) ? c/2*t*t*t*t + b : -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + return ((t/=d/2) < 1) ? c/2*t*t*t*t*t + b : c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * _easingsMath.c(t/d * (_easingsMath.p/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * _easingsMath.s(t/d * (_easingsMath.p/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (_easingsMath.c(_easingsMath.p*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * _easingsMath.w(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-_easingsMath.w(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * _easingsMath.w(2, 10 * (t - 1)) + b; + return c/2 * (-_easingsMath.w(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (_easingsMath.t(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * _easingsMath.t(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + return ((t/=d/2) < 1) ? -c/2 * (_easingsMath.t(1 - t*t) - 1) + b : c/2 * (_easingsMath.t(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=_easingsMath.o;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < _easingsMath.a(c)) { a=c; var s=p/4; } + else var s = p/(2*_easingsMath.p) * _easingsMath.n (c/a); + return -(a*_easingsMath.w(2,10*(t-=1)) * _easingsMath.s( (t*d-s)*(2*_easingsMath.p)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=_easingsMath.o;var p=0;var a=c; + if (t==0) return b; + if ((t/=d)==1) return b+c; + if (!p) p=d*.3; + if (a < _easingsMath.a(c)) { a=c; var s=p/4; } + else var s = p/(2*_easingsMath.p) * _easingsMath.n (c/a); + return a*_easingsMath.w(2,-10*t) * _easingsMath.s( (t*d-s)*(2*_easingsMath.p)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=_easingsMath.o;var p=0;var a=c; + if (t==0) return b; + if ((t/=d/2)==2) return b+c; + if (!p) p=d*(.3*1.5); + if (a < _easingsMath.a(c)) { a=c; var s=p/4; } + else var s = p/(2*_easingsMath.p) * _easingsMath.n (c/a); + if (t < 1) return -.5*(a*_easingsMath.w(2,10*(t-=1)) * _easingsMath.s( (t*d-s)*(2*_easingsMath.p)/p )) + b; + return a*_easingsMath.w(2,-10*(t-=1)) * _easingsMath.s( (t*d-s)*(2*_easingsMath.p)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + s = s || _easingsMath.o; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + s = s || _easingsMath.o; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + s = s || _easingsMath.o; + return ((t/=d/2) < 1) ? c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b : c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - this.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + var o = 7.5625; + if ((t/=d) < (1/2.75)) { + return c*(o*t*t) + b; + } else if (t < (2/2.75)) { + return c*(o*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(o*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(o*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + return (t < d/2) ? this.easeInBounce (x, t*2, 0, c, d) * .5 + b : this.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } + }; + /* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright © 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + })(); + var FRAMEWORK = (function() { + var _rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + var _strSpace = ' '; + var _strEmpty = ''; + var _strScrollLeft = 'scrollLeft'; + var _strScrollTop = 'scrollTop'; + var _animations = [ ]; + var _type = COMPATIBILITY.type; + var _cssNumber = { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }; + + var extend = function() { + var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, + i = 1, + length = arguments[LEXICON.l], + deep = false; + + // Handle a deep copy situation + if (_type(target) == TYPES.b) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if (_type(target) != TYPES.o && !_type(target) == TYPES.f) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if (length === i) { + target = FakejQuery; + --i; + } + + for (; i < length; i++) { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = COMPATIBILITY.isA(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && COMPATIBILITY.isA(src) ? src : []; + + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (copy !== undefined) { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; + }; + + var inArray = function(item, arr, fromIndex) { + for (var i = fromIndex || 0; i < arr[LEXICON.l]; i++) + if (arr[i] === item) + return i; + return -1; + } + + var isFunction = function(obj) { + return _type(obj) == TYPES.f; + }; + + var isEmptyObject = function(obj) { + for (var name in obj ) + return false; + return true; + }; + + var isPlainObject = function(obj) { + if (!obj || _type(obj) != TYPES.o) + return false; + + var key; + var proto = LEXICON.p; + var hasOwnProperty = Object[proto].hasOwnProperty; + var hasOwnConstructor = hasOwnProperty.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor[proto] && hasOwnProperty.call(obj.constructor[proto], 'isPrototypeOf'); + + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + + for (key in obj) { /**/ } + + return _type(key) == TYPES.u || hasOwnProperty.call(obj, key); + }; + + var each = function(obj, callback) { + var i = 0; + + if (isArrayLike(obj)) { + for (; i < obj[LEXICON.l]; i++) { + if (callback.call(obj[i], i, obj[i]) === false) + break; + } + } + else { + for (i in obj) { + if (callback.call(obj[i], i, obj[i]) === false) + break; + } + } + + return obj; + }; + + var FakejQuery = function (selector) { + if(arguments[LEXICON.l] === 0) + return this; + + var base = new FakejQuery(); + var elements = selector; + var i = 0; + var elms; + var el; + + if(_type(selector) == TYPES.s) { + elements = [ ]; + if(selector.charAt(0) === '<') { + el = document.createElement('div'); + el.innerHTML = selector; + elms = el.children; + } + else { + elms = document.querySelectorAll(selector); + } + + for(; i < elms[LEXICON.l]; i++) + elements.push(elms[i]); + } + + if(elements) { + if(_type(elements) != TYPES.s && !isArrayLike(elements)) + elements = [ elements ]; + + for(i = 0; i < elements[LEXICON.l]; i++) + base[i] = elements[i]; + + base[LEXICON.l] = elements[LEXICON.l]; + } + + return base; + }; + + function isArrayLike(obj) { + var length = !!obj && [LEXICON.l] in obj && obj[LEXICON.l]; + var t = _type(obj); + //|| obj === window = self added! + return isFunction(t) || obj === window ? false : (t == TYPES.a || length === 0 || _type(length) == TYPES.n && length > 0 && (length - 1) in obj); + } + + function stripAndCollapse(value) { + var tokens = value.match(_rnothtmlwhite) || []; + return tokens.join(_strSpace); + } + + function matches(elem, selector) { + var nodeList = (elem.parentNode || document).querySelectorAll(selector) || []; + var i = nodeList[LEXICON.l]; + + while (i--) + if (nodeList[i] == elem) + return true; + + return false; + } + + function insertAdjacentElement(el, strategy, child) { + if(_type(child) == TYPES.a) { + for(var i = 0; i < child[LEXICON.l]; i++) + insertAdjacentElement(el, strategy, child[i]); + } + else if(_type(child) == TYPES.s) + el.insertAdjacentHTML(strategy, child); + else + el.insertAdjacentElement(strategy, child.nodeType ? child : child[0]); + } + + function setCSSVal(el, prop, val) { + try { + if(el[LEXICON.s][prop] !== undefined) + el[LEXICON.s][prop] = parseCSSVal(prop, val); + } catch(e) { } + } + + function parseCSSVal(prop, val) { + if(!_cssNumber[prop.toLowerCase()] && _type(val) == TYPES.n) + val += 'px'; + return val; + } + + function startNextAnimationInQ(animObj, removeFromQ) { + var index; + var nextAnim; + if(removeFromQ !== false) + animObj.q.splice(0, 1); + if(animObj.q[LEXICON.l] > 0) { + nextAnim = animObj.q[0]; + animate(animObj.el, nextAnim.props, nextAnim.duration, nextAnim.easing, nextAnim.complete, true); + } + else { + index = inArray(animObj, _animations); + if(index > -1) + _animations.splice(index, 1); + } + } + + function setAnimationValue(el, prop, value) { + if(prop === _strScrollLeft || prop === _strScrollTop) + el[prop] = value; + else + setCSSVal(el, prop, value); + } + + function animate(el, props, options, easing, complete, guaranteedNext) { + var hasOptions = isPlainObject(options); + var from = { }; + var to = { }; + var i = 0; + var key; + var animObj; + var start; + var progress; + var step; + var specialEasing; + var duration; + if(hasOptions) { + easing = options.easing; + start = options.start; + progress = options.progress; + step = options.step; + specialEasing = options.specialEasing; + complete = options.complete; + duration = options.duration; + } + else + duration = options; + specialEasing = specialEasing || { }; + duration = duration || 400; + easing = easing || 'swing'; + guaranteedNext = guaranteedNext || false; + + for(; i < _animations[LEXICON.l]; i++) { + if(_animations[i].el === el) { + animObj = _animations[i]; + break; + } + } + + if(!animObj) { + animObj = { + el : el, + q : [] + }; + _animations.push(animObj); + } + + for (key in props) { + if(key === _strScrollLeft || key === _strScrollTop) + from[key] = el[key]; + else + from[key] = FakejQuery(el).css(key); + } + + for (key in from) { + if(from[key] !== props[key] && props[key] !== undefined) + to[key] = props[key]; + } + + if(!isEmptyObject(to)) { + var timeNow; + var end; + var percent; + var fromVal; + var toVal; + var easedVal; + var timeStart; + var frame; + var elapsed; + var qPos = guaranteedNext ? 0 : inArray(qObj, animObj.q); + var qObj = { + props : to, + duration : hasOptions ? options : duration, + easing : easing, + complete : complete + }; + if (qPos === -1) { + qPos = animObj.q[LEXICON.l]; + animObj.q.push(qObj); + } + + if(qPos === 0) { + if(duration > 0) { + timeStart = COMPATIBILITY.now(); + frame = function() { + timeNow = COMPATIBILITY.now(); + elapsed = (timeNow - timeStart); + end = qObj.stop || elapsed >= duration; + percent = 1 - ((Math.max(0, timeStart + duration - timeNow) / duration) || 0); + + for(key in to) { + fromVal = parseFloat(from[key]); + toVal = parseFloat(to[key]); + easedVal = (toVal - fromVal) * EASING[specialEasing[key] || easing](percent, percent * duration, 0, 1, duration) + fromVal; + setAnimationValue(el, key, easedVal); + if(isFunction(step)) { + step(easedVal, { + elem : el, + prop : key, + start : fromVal, + now : easedVal, + end : toVal, + pos : percent, + options : { + easing : easing, + speacialEasing : specialEasing, + duration : duration, + complete : complete, + step : step + }, + startTime : timeStart + }); + } + } + + if(isFunction(progress)) + progress({ }, percent, Math.max(0, duration - elapsed)); + + if (end) { + startNextAnimationInQ(animObj); + if(isFunction(complete)) + complete(); + } + else + qObj.frame = COMPATIBILITY.rAF()(frame); + }; + qObj.frame = COMPATIBILITY.rAF()(frame); + } + else { + for(key in to) + setAnimationValue(el, key, to[key]); + startNextAnimationInQ(animObj); + } + } + } + else if(guaranteedNext) + startNextAnimationInQ(animObj); + } + + function stop(el, clearQ, jumpToEnd) { + var animObj; + var qObj; + var key; + var i = 0; + for(; i < _animations[LEXICON.l]; i++) { + animObj = _animations[i]; + if(animObj.el === el) { + if(animObj.q[LEXICON.l] > 0) { + qObj = animObj.q[0]; + qObj.stop = true; + COMPATIBILITY.cAF()(qObj.frame); + animObj.q.splice(0, 1); + + if(jumpToEnd) + for(key in qObj.props) + setAnimationValue(el, key, qObj.props[key]); + + if(clearQ) + animObj.q = [ ]; + else + startNextAnimationInQ(animObj, false); + } + break; + } + } + } + + FakejQuery[LEXICON.p] = { + + //EVENTS: + + on : function(eventName, handler) { + eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty]; + + var eventNameLength = eventName[LEXICON.l]; + var i = 0; + var el; + return this.each(function() { + el = this; + try { + if (el.addEventListener) { + for (; i < eventNameLength; i++) + el.addEventListener(eventName[i], handler); + } + else if(el.detachEvent) { + for (; i < eventNameLength; i++) + el.attachEvent('on' + eventName[i], handler); + } + } catch (e) { } + }); + }, + + off : function(eventName, handler) { + eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty]; + + var eventNameLength = eventName[LEXICON.l]; + var i = 0; + var el; + return this.each(function() { + el = this; + try { + if (el.removeEventListener) { + for (; i < eventNameLength; i++) + el.removeEventListener(eventName[i], handler); + } + else if(el.detachEvent) { + for (; i < eventNameLength; i++) + el.detachEvent('on' + eventName[i], handler); + } + } catch (e) { } + }); + }, + + one : function (eventName, handler) { + eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty]; + return this.each(function() { + var el = FakejQuery(this); + FakejQuery.each(eventName, function(i, oneEventName) { + var oneHandler = function(e) { + handler.call(this, e); + el.off(oneEventName, oneHandler); + }; + el.on(oneEventName, oneHandler); + }); + }); + }, + + trigger : function(eventName) { + var el; + var event; + return this.each(function() { + el = this; + if (document.createEvent) { + event = document.createEvent('HTMLEvents'); + event.initEvent(eventName, true, false); + el.dispatchEvent(event); + } + else { + el.fireEvent("on" + eventName); + } + }); + }, + + //DOM NODE INSERTING / REMOVING: + + append : function(child) { + return this.each(function() { insertAdjacentElement(this, 'beforeend', child); }); + }, + + prepend : function(child) { + return this.each(function() { insertAdjacentElement(this, 'afterbegin', child); }); + }, + + before : function(child) { + return this.each(function() { insertAdjacentElement(this, 'beforebegin', child); }); + }, + + after : function(child) { + return this.each(function() { insertAdjacentElement(this, 'afterend', child); }); + }, + + remove : function() { + return this.each(function() { + var el = this; + var parentNode = el.parentNode; + if(parentNode != null) + parentNode.removeChild(el); + }); + }, + + unwrap : function() { + var parents = [ ]; + var i; + var el; + var parent; + + this.each(function() { + parent = this.parentNode; + if(inArray(parent, parents) === - 1) + parents.push(parent); + }); + + for(i = 0; i < parents[LEXICON.l]; i++) { + el = parents[i]; + parent = el.parentNode; + while (el.firstChild) + parent.insertBefore(el.firstChild, el); + parent.removeChild(el); + } + + return this; + }, + + wrapAll : function(wrapperHTML) { + var i; + var nodes = this; + var wrapper = FakejQuery(wrapperHTML)[0]; + var deepest = wrapper; + var parent = nodes[0].parentNode; + var previousSibling = nodes[0].previousSibling; + while(deepest.childNodes[LEXICON.l] > 0) + deepest = deepest.childNodes[0]; + + for (i = 0; nodes[LEXICON.l] - i; deepest.firstChild === nodes[0] && i++) + deepest.appendChild(nodes[i]); + + var nextSibling = previousSibling ? previousSibling.nextSibling : parent.firstChild; + parent.insertBefore(wrapper, nextSibling); + + return this; + }, + + wrapInner : function(wrapperHTML) { + return this.each(function() { + var el = FakejQuery(this); + var contents = el.contents(); + + if (contents[LEXICON.l]) + contents.wrapAll(wrapperHTML); + else + el.append(wrapperHTML); + }); + }, + + wrap : function(wrapperHTML) { + return this.each(function() { FakejQuery(this).wrapAll(wrapperHTML); }); + }, + + + //DOM NODE MANIPULATION / INFORMATION: + + css : function(styles, val) { + var el; + var key; + var cptStyle; + var getCptStyle = window.getComputedStyle; + if(_type(styles) == TYPES.s) { + if(val === undefined) { + el = this[0]; + cptStyle = getCptStyle ? getCptStyle(el, null) : el.currentStyle[styles]; + + //https://bugzilla.mozilla.org/show_bug.cgi?id=548397 can be null sometimes if iframe with display: none (firefox only!) + return getCptStyle ? cptStyle != null ? cptStyle.getPropertyValue(styles) : el[LEXICON.s][styles] : cptStyle; + } + else { + return this.each(function() { + setCSSVal(this, styles, val); + }); + } + } + else { + return this.each(function() { + for(key in styles) + setCSSVal(this, key, styles[key]); + }); + } + }, + + hasClass : function(className) { + var elem, i = 0; + var classNamePrepared = _strSpace + className + _strSpace; + var classList; + + while ((elem = this[ i++ ])) { + classList = elem.classList; + if(classList && classList.contains(className)) + return true; + else if (elem.nodeType === 1 && (_strSpace + stripAndCollapse(elem.className + _strEmpty) + _strSpace).indexOf(classNamePrepared) > -1) + return true; + } + + return false; + }, + + addClass : function(className) { + var classes; + var elem; + var cur; + var curValue; + var clazz; + var finalValue; + var supportClassList; + var elmClassList; + var i = 0; + var v = 0; + + if (className) { + classes = className.match( _rnothtmlwhite ) || []; + + while ((elem = this[i++])) { + elmClassList = elem.classList; + if(supportClassList === undefined) + supportClassList = elmClassList !== undefined; + + if(supportClassList) { + while ((clazz = classes[v++])) + elmClassList.add(clazz); + } + else { + curValue = elem.className + _strEmpty; + cur = elem.nodeType === 1 && (_strSpace + stripAndCollapse(curValue) + _strSpace); + + if (cur) { + while ((clazz = classes[v++])) + if (cur.indexOf(_strSpace + clazz + _strSpace) < 0) + cur += clazz + _strSpace; + + finalValue = stripAndCollapse(cur); + if (curValue !== finalValue) + elem.className = finalValue; + } + } + } + } + + return this; + }, + + removeClass : function(className) { + var classes; + var elem; + var cur; + var curValue; + var clazz; + var finalValue; + var supportClassList; + var elmClassList; + var i = 0; + var v = 0; + + if (className) { + classes = className.match(_rnothtmlwhite) || []; + + while ((elem = this[i++])) { + elmClassList = elem.classList; + if(supportClassList === undefined) + supportClassList = elmClassList !== undefined; + + if(supportClassList) { + while ((clazz = classes[v++])) + elmClassList.remove(clazz); + } + else { + curValue = elem.className + _strEmpty; + cur = elem.nodeType === 1 && (_strSpace + stripAndCollapse(curValue) + _strSpace); + + if (cur) { + while ((clazz = classes[v++])) + while (cur.indexOf(_strSpace + clazz + _strSpace) > -1) + cur = cur.replace(_strSpace + clazz + _strSpace, _strSpace); + + finalValue = stripAndCollapse(cur); + if (curValue !== finalValue) + elem.className = finalValue; + } + } + } + } + + return this; + }, + + hide : function() { + return this.each(function() { this[LEXICON.s].display = 'none'; }); + }, + + show : function() { + return this.each(function() { this[LEXICON.s].display = 'block'; }); + }, + + attr : function(attrName, value) { + var i = 0; + var el; + while (el = this[i++]) { + if(value === undefined) + return el.getAttribute(attrName); + el.setAttribute(attrName, value); + } + return this; + }, + + removeAttr : function(attrName) { + return this.each(function() { this.removeAttribute(attrName); }); + }, + + offset : function() { + var el = this[0]; + var rect = el.getBoundingClientRect(); + var scrollLeft = window.pageXOffset || document.documentElement[_strScrollLeft]; + var scrollTop = window.pageYOffset || document.documentElement[_strScrollTop]; + return { + top: rect.top + scrollTop, + left: rect.left + scrollLeft + }; + }, + + position : function() { + var el = this[0]; + return { + top: el.offsetTop, + left: el.offsetLeft + }; + }, + + scrollLeft : function(value) { + var i = 0; + var el; + while (el = this[i++]) { + if(value === undefined) + return el[_strScrollLeft]; + el[_strScrollLeft] = value; + } + return this; + }, + + scrollTop : function(value) { + var i = 0; + var el; + while (el = this[i++]) { + if(value === undefined) + return el[_strScrollTop]; + el[_strScrollTop] = value; + } + return this; + }, + + val : function(value) { + var el = this[0]; + if(!value) + return el.value; + el.value = value; + return this; + }, + + + //DOM TRAVERSAL / FILTERING: + + first : function() { + return this.eq(0); + }, + + last : function() { + return this.eq(-1); + }, + + eq : function(index) { + return FakejQuery(this[index >= 0 ? index : this[LEXICON.l] + index]); + }, + + find : function(selector) { + var children = [ ]; + var i; + this.each(function() { + var el = this; + var ch = el.querySelectorAll(selector); + for(i = 0; i < ch[LEXICON.l]; i++) + children.push(ch[i]); + }); + return FakejQuery(children); + }, + + children : function(selector) { + var children = [ ]; + var el; + var ch; + var i; + + this.each(function() { + ch = this.children; + for(i = 0; i < ch[LEXICON.l]; i++) { + el = ch[i]; + if(selector) { + if((el.matches && el.matches(selector)) || matches(el, selector)) + children.push(el); + } + else + children.push(el); + } + }); + return FakejQuery(children); + }, + + parent : function(selector) { + var parents = [ ]; + var parent; + this.each(function() { + parent = this.parentNode; + if(selector ? FakejQuery(parent).is(selector) : true) + parents.push(parent); + }); + return FakejQuery(parents); + }, + + is : function(selector) { + var el; + var i; + for(i = 0; i < this[LEXICON.l]; i++) { + el = this[i]; + if(selector === ":visible") + return !!(el[LEXICON.oW] || el[LEXICON.oH] || el.getClientRects()[LEXICON.l]); + if(selector === ":hidden") + return !!!(el[LEXICON.oW] || el[LEXICON.oH] || el.getClientRects()[LEXICON.l]); + if((el.matches && el.matches(selector)) || matches(el, selector)) + return true; + } + return false; + }, + + contents : function() { + var contents = [ ]; + var childs; + var i; + + this.each(function() { + childs = this.childNodes; + for(i = 0; i < childs[LEXICON.l]; i++) + contents.push(childs[i]); + }); + + return FakejQuery(contents); + }, + + each : function(callback) { + return each(this, callback); + }, + + + //ANIMATION: + + animate : function(props, duration, easing, complete) { + return this.each(function() { animate(this, props, duration, easing, complete); }); + }, + + stop : function(clearQ, jump) { + return this.each(function() { stop(this, clearQ, jump); }); + } + }; + + extend(FakejQuery, { + extend : extend, + inArray : inArray, + isEmptyObject : isEmptyObject, + isPlainObject : isPlainObject, + each : each + }); + + return FakejQuery; + })(); + var INSTANCES = (function() { + var _targets = [ ]; + var _instancePropertyString = '__overlayScrollbars__'; + + /** + * Register, unregister or get a certain (or all) instances. + * Register: Pass the target and the instance. + * Unregister: Pass the target and null. + * Get Instance: Pass the target from which the instance shall be got. + * Get Targets: Pass no arguments. + * @param target The target to which the instance shall be registered / from which the instance shall be unregistered / the instance shall be got + * @param instance The instance. + * @returns {*|void} Returns the instance from the given target. + */ + return function (target, instance) { + var argLen = arguments[LEXICON.l]; + if(argLen < 1) { + //return all targets + return _targets; + } + else { + if(instance) { + //register instance + target[_instancePropertyString] = instance; + _targets.push(target); + } + else { + var index = COMPATIBILITY.inA(target, _targets); + if (index > -1) { + if(argLen > 1) { + //unregister instance + delete target[_instancePropertyString]; + _targets.splice(index, 1); + } + else { + //get instance from target + return _targets[index][_instancePropertyString]; + } + } + } + } + } + })(); + var PLUGIN = (function() { + var _pluginsGlobals; + var _pluginsAutoUpdateLoop; + var _pluginsExtensions = [ ]; + var _pluginsOptions = (function() { + var possibleTemplateTypes = [ + TYPES.b, //boolean + TYPES.n, //number + TYPES.s, //string + TYPES.a, //array + TYPES.o, //object + TYPES.f, //function + TYPES.z //null + ]; + var restrictedStringsSplit = " "; + var restrictedStringsPossibilitiesSplit = ":"; + var classNameAllowedValues = [TYPES.z, TYPES.s]; + var numberAllowedValues = TYPES.n; + var booleanNullAllowedValues = [TYPES.z, TYPES.b]; + var booleanTrueTemplate = [true, TYPES.b]; + var booleanFalseTemplate = [false, TYPES.b]; + var callbackTemplate = [null, [TYPES.z, TYPES.f]]; + var resizeAllowedValues = 'n:none b:both h:horizontal v:vertical'; + var overflowBehaviorAllowedValues = 'v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden'; + var scrollbarsVisibilityAllowedValues = 'v:visible h:hidden a:auto'; + var scrollbarsAutoHideAllowedValues = 'n:never s:scroll l:leave m:move'; + var optionsDefaultsAndTemplate = { + className: ['os-theme-dark', classNameAllowedValues], //null || string + resize: ['none', resizeAllowedValues], //none || both || horizontal || vertical || n || b || h || v + sizeAutoCapable: booleanTrueTemplate, //true || false + clipAlways: booleanTrueTemplate, //true || false + normalizeRTL: booleanTrueTemplate, //true || false + paddingAbsolute: booleanFalseTemplate, //true || false + autoUpdate: [null, booleanNullAllowedValues], //true || false || null + autoUpdateInterval: [33, numberAllowedValues], //number + nativeScrollbarsOverlaid: { + showNativeScrollbars: booleanFalseTemplate, //true || false + initialize: booleanTrueTemplate //true || false + }, + overflowBehavior: { + x: ['scroll', overflowBehaviorAllowedValues], //visible-hidden || visible-scroll || hidden || scroll || v-h || v-s || h || s + y: ['scroll', overflowBehaviorAllowedValues] //visible-hidden || visible-scroll || hidden || scroll || v-h || v-s || h || s + }, + scrollbars: { + visibility: ['auto', scrollbarsVisibilityAllowedValues], //visible || hidden || auto || v || h || a + autoHide: ['never', scrollbarsAutoHideAllowedValues], //never || scroll || leave || move || n || s || l || m + autoHideDelay: [800, numberAllowedValues], //number + dragScrolling: booleanTrueTemplate, //true || false + clickScrolling: booleanFalseTemplate, //true || false + touchSupport: booleanTrueTemplate //true || false + }, + textarea: { + dynWidth: booleanFalseTemplate, //true || false + dynHeight: booleanFalseTemplate //true || false + }, + callbacks: { + onInitialized: callbackTemplate, //null || function + onInitializationWithdrawn: callbackTemplate, //null || function + onDestroyed: callbackTemplate, //null || function + onScrollStart: callbackTemplate, //null || function + onScroll: callbackTemplate, //null || function + onScrollStop: callbackTemplate, //null || function + onOverflowChanged: callbackTemplate, //null || function + onOverflowAmountChanged: callbackTemplate, //null || function + onDirectionChanged: callbackTemplate, //null || function + onContentSizeChanged: callbackTemplate, //null || function + onHostSizeChanged: callbackTemplate, //null || function + onUpdated: callbackTemplate //null || function + } + }; + var convert = function(template) { + var recursive = function(obj) { + var key; + var val; + var valType; + for(key in obj) { + if(!obj.hasOwnProperty(key)) + continue; + val = obj[key]; + valType = COMPATIBILITY.type(val); + if(valType == TYPES.a) + obj[key] = val[template ? 1 : 0]; + else if(valType == TYPES.o) + obj[key] = recursive(val); + } + return obj; + }; + return recursive(FRAMEWORK.extend(true, { }, optionsDefaultsAndTemplate)); + }; + + return { + //defaults + d : convert(), + + //template + t : convert(true), + + //validate + /** + * Validates the passed object by the passed template. + * @param obj The object which shall be validated. + * @param template The template which defines the allowed values and types. + * @param writeErrors True if errors shall be logged to the console. + * @param usePreparedValues True if the validated main values shall be returned in the validated object, false otherwise. + * @param keepForeignProps True if properties which aren't in the template shall be added to the validated object, false otherwise. + * @returns {{}} A object which contains only the valid properties of the passed original object. + */ + v : function (obj, template, writeErrors, usePreparedValues, keepForeignProps) { + var validatedOptions = { }; + var objectCopy = FRAMEWORK.extend(true, { }, obj); + var checkObjectProps = function(data, template, validatedOptions, prevPropName) { + for (var prop in template) { + if (template.hasOwnProperty(prop) && data.hasOwnProperty(prop)) { + var isValid = false; + var templateValue = template[prop]; + var templateValueType = COMPATIBILITY.type(templateValue); + var templateTypes = COMPATIBILITY.type(templateValue) != TYPES.a ? [ templateValue ] : templateValue; + var dataValue = data[prop]; + var dataValueType = COMPATIBILITY.type(dataValue); + var propPrefix = prevPropName ? prevPropName + "." : ""; + var error = "The option \"" + propPrefix + prop + "\" wasn't set, because"; + var errorPossibleTypes = [ ]; + var errorRestrictedStrings = [ ]; + var restrictedStringValuesSplit; + var restrictedStringValuesPossibilitiesSplit; + var isRestrictedValue; + var mainPossibility; + var currType; + var i; + var v; + var j; + + //if the template has a object as value, it means that the options are complex (verschachtelt) + if(templateValueType == TYPES.o) { + validatedOptions[prop] = { }; + checkObjectProps(dataValue, templateValue, validatedOptions[prop], propPrefix + prop); + if(FRAMEWORK.isEmptyObject(dataValue)) + delete data[prop]; + } + else { + for(i = 0; i < templateTypes.length; i++) { + currType = templateTypes[i]; + templateValueType = COMPATIBILITY.type(currType); + //if currtype is string and starts with restrictedStringPrefix and end with restrictedStringSuffix + isRestrictedValue = templateValueType == TYPES.s && FRAMEWORK.inArray(currType, possibleTemplateTypes) === -1; + if(isRestrictedValue) { + errorPossibleTypes.push(TYPES.s); + + //split it into a array which contains all possible values for example: ["y:yes", "n:no", "m:maybe"] + restrictedStringValuesSplit = currType.split(restrictedStringsSplit); + errorRestrictedStrings = errorRestrictedStrings.concat(restrictedStringValuesSplit); + for(v = 0; v < restrictedStringValuesSplit.length; v++) { + //split the possible values into their possibiliteis for example: ["y", "yes"] -> the first is always the mainPossibility + restrictedStringValuesPossibilitiesSplit = restrictedStringValuesSplit[v].split(restrictedStringsPossibilitiesSplit); + mainPossibility = restrictedStringValuesPossibilitiesSplit[0]; + for(j = 0; j < restrictedStringValuesPossibilitiesSplit.length; j++) { + //if any possibility matches with the dataValue, its valid + if(dataValue === restrictedStringValuesPossibilitiesSplit[j]) { + isValid = true; + break; + } + } + if(isValid) + break; + } + } + else { + errorPossibleTypes.push(currType); + + if(dataValueType === currType) { + isValid = true; + break; + } + } + } + + if(isValid) { + validatedOptions[prop] = isRestrictedValue && usePreparedValues ? mainPossibility : dataValue; + } + else if(writeErrors) { + console.warn(error + " it doesn't accept the type [ " + dataValueType.toUpperCase() + " ] with the value of \"" + dataValue + "\".\r\n" + + "Accepted types are: [ " + errorPossibleTypes.join(", ").toUpperCase() + " ]." + + (errorRestrictedStrings.length > 0 ? "\r\nValid strings are: [ " + errorRestrictedStrings.join(", ").split(restrictedStringsPossibilitiesSplit).join(", ") + " ]." : "")); + } + delete data[prop]; + } + } + } + }; + checkObjectProps(objectCopy, template, validatedOptions); + + //add values which aren't specified in the template to the finished validated object to prevent them from being discarded + if(keepForeignProps) + FRAMEWORK.extend(true, validatedOptions, objectCopy); + else if(!FRAMEWORK.isEmptyObject(objectCopy) && writeErrors) + console.warn("The following options are discarded due to invalidity:\r\n" + JSON.stringify(objectCopy, null, 2)); + + return validatedOptions; + } + } + }()); + + /** + * Initializes the object which contains global information about the plugin and each instance of it. + */ + function initOverlayScrollbarsStatics() { + if(!_pluginsGlobals) + _pluginsGlobals = new OverlayScrollbarsGlobals(_pluginsOptions.d); + if(!_pluginsAutoUpdateLoop) + _pluginsAutoUpdateLoop = new OverlayScrollbarsAutoUpdateLoop(_pluginsGlobals); + } + + /** + * The global object for the OverlayScrollbars objects. It contains resources which every OverlayScrollbars object needs. This object is initialized only once: if the first OverlayScrollbars object gets initialized. + * @param defaultOptions + * @constructor + */ + function OverlayScrollbarsGlobals(defaultOptions) { + var _base = this; + var strOverflow = 'overflow'; + var strHidden = 'hidden'; + var strScroll = 'scroll'; + var bodyElement = FRAMEWORK('body'); + var scrollbarDummyElement = FRAMEWORK('
'); + var scrollbarDummyElement0 = scrollbarDummyElement[0]; + var dummyContainerChild = FRAMEWORK(scrollbarDummyElement.children('div').eq(0)); + + bodyElement.append(scrollbarDummyElement); + scrollbarDummyElement.hide().show(); //fix IE8 bug (incorrect measuring) + + var nativeScrollbarSize = calcNativeScrollbarSize(scrollbarDummyElement0); + var nativeScrollbarIsOverlaid = { + x: nativeScrollbarSize.x === 0, + y: nativeScrollbarSize.y === 0 + }; + + FRAMEWORK.extend(_base, { + defaultOptions : defaultOptions, + autoUpdateLoop : false, + autoUpdateRecommended : !COMPATIBILITY.mO(), + nativeScrollbarSize : nativeScrollbarSize, + nativeScrollbarIsOverlaid : nativeScrollbarIsOverlaid, + nativeScrollbarStyling : (function() { + scrollbarDummyElement.addClass('os-viewport-native-scrollbars-invisible'); + //fix opera bug: scrollbar styles will only appear if overflow value is scroll or auto during the activation of the style. + //and set overflow to scroll + scrollbarDummyElement.css(strOverflow, strHidden).hide().css(strOverflow, strScroll).show(); + return (scrollbarDummyElement0[LEXICON.oH] - scrollbarDummyElement0[LEXICON.cH]) === 0 && (scrollbarDummyElement0[LEXICON.oW] - scrollbarDummyElement0[LEXICON.cW]) === 0; + })(), + overlayScrollbarDummySize : { x: 30, y: 30 }, + msie : (function() { + var ua = window.navigator.userAgent; + var strIndexOf = 'indexOf'; + var strSubString = 'substring'; + var msie = ua[strIndexOf]('MSIE '); + var trident = ua[strIndexOf]('Trident/'); + var edge = ua[strIndexOf]('Edge/'); + var rv = ua[strIndexOf]('rv:'); + var result; + var parseInt = window.parseInt; + + // IE 10 or older => return version number + if (msie > 0) + result = parseInt(ua[strSubString](msie + 5, ua[strIndexOf]('.', msie)), 10); + + // IE 11 => return version number + else if (trident > 0) + result = parseInt(ua[strSubString](rv + 3, ua[strIndexOf]('.', rv)), 10); + + // Edge (IE 12+) => return version number + else if (edge > 0) + result = parseInt(ua[strSubString](edge + 5, ua[strIndexOf]('.', edge)), 10); + + // other browser + return result; + })(), + cssCalc : (function() { + var dummy = document.createElement('div'); + var props = ['calc', '-webkit-calc', '-moz-calc', '-o-calc']; + var i; + var prop; + + for (i = 0; i < props.length; ++i) { + prop = props[i]; + dummy[LEXICON.s].cssText = 'width:' + prop + '(1px);'; + if (dummy[LEXICON.s].length) + return prop; + } + return null; + })(), + restrictedMeasuring : (function() { + //https://bugzilla.mozilla.org/show_bug.cgi?id=1439305 + scrollbarDummyElement.css(strOverflow, strHidden); + var scrollSize = { + w : scrollbarDummyElement0[LEXICON.sW], + h : scrollbarDummyElement0[LEXICON.sH] + }; + scrollbarDummyElement.css(strOverflow, 'visible'); + var scrollSize2 = { + w : scrollbarDummyElement0[LEXICON.sW], + h : scrollbarDummyElement0[LEXICON.sH] + }; + return (scrollSize.w - scrollSize2.w) !== 0 || (scrollSize.h - scrollSize2.h) !== 0; + })(), + rtlScrollBehavior : (function() { + scrollbarDummyElement.css({ 'overflow-y' : strHidden, 'overflow-x' : strScroll, 'direction' : 'rtl' }).scrollLeft(0); + var dummyContainerOffset = scrollbarDummyElement.offset(); + var dummyContainerChildOffset = dummyContainerChild.offset(); + scrollbarDummyElement.scrollLeft(999); + var dummyContainerScrollOffsetAfterScroll = dummyContainerChild.offset(); + return { + //origin direction = determines if the zero scroll position is on the left or right side + //'i' means 'invert' (i === true means that the axis must be inverted to be correct) + //true = on the left side + //false = on the right side + i : dummyContainerOffset.left === dummyContainerChildOffset.left, + //negative = determines if the maximum scroll is positive or negative + //'n' means 'negate' (n === true means that the axis must be negated to be correct) + //true = negative + //false = positive + n : dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left === 0 + }; + })(), + supportTransform : detectCSSFeature('transform'), + supportTransition : detectCSSFeature('transition'), + supportPassiveEvents : (function() { + var supportsPassive = false; + try { + window.addEventListener('test', null, Object.defineProperty({ }, 'passive', { + get: function() { + supportsPassive = true; + } + })); + } catch (e) { } + return supportsPassive; + })(), + supportResizeObserver : !!COMPATIBILITY.rO(), + supportMutationObserver : !!COMPATIBILITY.mO() + }); + + scrollbarDummyElement.removeAttr(LEXICON.s).remove(); + + //Catch zoom event: + (function () { + if(nativeScrollbarIsOverlaid.x && nativeScrollbarIsOverlaid.y) + return; + + var abs = Math.abs; + var windowWidth = COMPATIBILITY.wW(); + var windowHeight = COMPATIBILITY.wH(); + var windowDpr = getWindowDPR(); + var onResize = function() { + if(INSTANCES().length > 0) { + var newW = COMPATIBILITY.wW(); + var newH = COMPATIBILITY.wH(); + var deltaW = newW - windowWidth; + var deltaH = newH - windowHeight; + + if (deltaW === 0 && deltaH === 0) + return; + + var deltaWRatio = Math.round(newW / (windowWidth / 100.0)); + var deltaHRatio = Math.round(newH / (windowHeight / 100.0)); + var absDeltaW = abs(deltaW); + var absDeltaH = abs(deltaH); + var absDeltaWRatio = abs(deltaWRatio); + var absDeltaHRatio = abs(deltaHRatio); + var newDPR = getWindowDPR(); + + var deltaIsBigger = absDeltaW > 2 && absDeltaH > 2; + var difference = !differenceIsBiggerThanOne(absDeltaWRatio, absDeltaHRatio); + var dprChanged = newDPR !== windowDpr && windowDpr > 0; + var isZoom = deltaIsBigger && difference && dprChanged; + var oldScrollbarSize = _base.nativeScrollbarSize; + var newScrollbarSize; + + if (isZoom) { + bodyElement.append(scrollbarDummyElement); + newScrollbarSize = _base.nativeScrollbarSize = calcNativeScrollbarSize(scrollbarDummyElement[0]); + scrollbarDummyElement.remove(); + if(oldScrollbarSize.x !== newScrollbarSize.x || oldScrollbarSize.y !== newScrollbarSize.y) { + FRAMEWORK.each(INSTANCES(), function () { + if(INSTANCES(this)) + INSTANCES(this).update('zoom'); + }); + } + } + + windowWidth = newW; + windowHeight = newH; + windowDpr = newDPR; + } + }; + + function differenceIsBiggerThanOne(valOne, valTwo) { + var absValOne = abs(valOne); + var absValTwo = abs(valTwo); + return !(absValOne === absValTwo || absValOne + 1 === absValTwo || absValOne - 1 === absValTwo); + } + + function getWindowDPR() { + var dDPI = window.screen.deviceXDPI || 0; + var sDPI = window.screen.logicalXDPI || 1; + return window.devicePixelRatio || (dDPI / sDPI); + } + + FRAMEWORK(window).on('resize', onResize); + })(); + + function detectCSSFeature(featurename) { + var feature = false; + var domPrefixes = 'Webkit Moz ms O'.split(' '); + var elm = document.createElement('div'); + var featurenameCapital = null; + var i = 0; + + featurename = featurename.toLowerCase(); + + if (elm[LEXICON.s][featurename] !== undefined) + feature = true; + + if (!feature) { + featurenameCapital = featurename.charAt(0).toUpperCase() + featurename.substr(1); + for (; i < domPrefixes.length; i++) { + if (elm[LEXICON.s][domPrefixes[i] + featurenameCapital] !== undefined) { + feature = true; + break; + } + } + } + return feature; + } + + function calcNativeScrollbarSize(measureElement) { + return { + x: measureElement[LEXICON.oH] - measureElement[LEXICON.cH], + y: measureElement[LEXICON.oW] - measureElement[LEXICON.cW] + }; + } + } + + /** + * The object which manages the auto update loop for all OverlayScrollbars objects. This object is initialized only once: if the first OverlayScrollbars object gets initialized. + * @constructor + */ + function OverlayScrollbarsAutoUpdateLoop(globals) { + var _base = this; + var _strAutoUpdate = 'autoUpdate'; + var _strAutoUpdateInterval = _strAutoUpdate + 'Interval'; + var _strLength = LEXICON.l; + + var _loopingInstances = [ ]; + var _loopingInstancesIntervalCache = [ ]; + var _loopIsActive = false; + var _loopIntervalDefault = 33; + var _loopInterval = _loopIntervalDefault; + var _loopTimeOld = COMPATIBILITY.now(); + var _loopID; + + /** + * The auto update loop which will run every 50 milliseconds or less if the update interval of a instance is lower than 50 milliseconds. + */ + var loop = function() { + if(_loopingInstances[_strLength] > 0 && _loopIsActive) { + _loopID = COMPATIBILITY.rAF()(function () { + loop(); + }); + var timeNew = COMPATIBILITY.now(); + var timeDelta = timeNew - _loopTimeOld; + + if (timeDelta > _loopInterval) { + _loopTimeOld = timeNew - (timeDelta % _loopInterval); + var lowestInterval = _loopIntervalDefault; + for(var i = 0; i < _loopingInstances[_strLength]; i++) { + var instance = _loopingInstances[i]; + if (instance !== undefined) { + var instanceOptions = instance.options(); + var instanceAutoUpdateAllowed = instanceOptions[_strAutoUpdate]; + var instanceAutoUpdateInterval = Math.max(1, instanceOptions[_strAutoUpdateInterval]); + var now = COMPATIBILITY.now(); + if ((instanceAutoUpdateAllowed === true || instanceAutoUpdateAllowed === null) && (now - _loopingInstancesIntervalCache[i]) > instanceAutoUpdateInterval) { + instance.update('auto'); + _loopingInstancesIntervalCache[i] = new Date(now += instanceAutoUpdateInterval); + } + lowestInterval = Math.max(1, Math.min(lowestInterval, instanceAutoUpdateInterval)); + } + } + _loopInterval = lowestInterval; + } + } else { + _loopInterval = _loopIntervalDefault; + } + }; + + /** + * Add OverlayScrollbars instance to the auto update loop. Only successful if the instance isn't already added. + * @param instance The instance which shall be updated in a loop automatically. + */ + _base.add = function(instance) { + if(FRAMEWORK.inArray(instance, _loopingInstances) === -1) { + _loopingInstances.push(instance); + _loopingInstancesIntervalCache.push(COMPATIBILITY.now()); + if (_loopingInstances[_strLength] > 0 && !_loopIsActive) { + _loopIsActive = true; + globals.autoUpdateLoop = _loopIsActive; + loop(); + } + } + }; + + /** + * Remove OverlayScrollbars instance from the auto update loop. Only successful if the instance was added before. + * @param instance The instance which shall be updated in a loop automatically. + */ + _base.remove = function(instance) { + var index = FRAMEWORK.inArray(instance, _loopingInstances); + if(index > -1) { + //remove from loopingInstances list + _loopingInstancesIntervalCache.splice(index, 1); + _loopingInstances.splice(index, 1); + + //correct update loop behavior + if (_loopingInstances[_strLength] === 0 && _loopIsActive) { + _loopIsActive = false; + globals.autoUpdateLoop = _loopIsActive; + if(_loopID !== undefined) { + COMPATIBILITY.cAF()(_loopID); + _loopID = -1; + } + } + } + }; + } + + /** + * A object which manages the scrollbars visibility of the target element. + * @param pluginTargetElement The element from which the scrollbars shall be hidden. + * @param options The custom options. + * @param extensions The custom extensions. + * @param globals + * @param autoUpdateLoop + * @returns {*} + * @constructor + */ + function OverlayScrollbarsInstance(pluginTargetElement, options, extensions, globals, autoUpdateLoop) { + //if passed element is no HTML element: skip and return + if(!isHTMLElement(pluginTargetElement)) + return; + + //if passed element is already initialized: set passed options if there are any and return its instance + if(INSTANCES(pluginTargetElement)) { + var inst = INSTANCES(pluginTargetElement); + inst.options(options); + return inst; + } + + //make correct instanceof + var _base = new window[PLUGINNAME](); + var _frameworkProto = FRAMEWORK[LEXICON.p]; + + //globals: + var _nativeScrollbarIsOverlaid; + var _overlayScrollbarDummySize; + var _rtlScrollBehavior; + var _autoUpdateRecommended; + var _msieVersion; + var _nativeScrollbarStyling; + var _cssCalc; + var _nativeScrollbarSize; + var _supportTransition; + var _supportTransform; + var _supportPassiveEvents; + var _supportResizeObserver; + var _restrictedMeasuring; + + //general readonly: + var _initialized; + var _destroyed; + var _isTextarea; + var _isBody; + var _documentMixed; + + //general: + var _isBorderBox; + var _sizeAutoObserverAdded; + var _paddingX; + var _paddingY; + var _borderX; + var _borderY; + var _marginX; + var _marginY; + var _isRTL; + var _isSleeping; + var _contentBorderSize = { }; + var _scrollHorizontalInfo = { }; + var _scrollVerticalInfo = { }; + var _viewportSize = { }; + var _nativeScrollbarMinSize = { }; + + //scroll + var _scrollStopDelay = 175; + var _scrollStopTimeoutId; + + //naming: + var _strMinusHidden = '-hidden'; + var _strMarginMinus = 'margin-'; + var _strPaddingMinus = 'padding-'; + var _strBorderMinus = 'border-'; + var _strTop = 'top'; + var _strRight = 'right'; + var _strBottom = 'bottom'; + var _strLeft = 'left'; + var _strMinMinus = 'min-'; + var _strMaxMinus = 'max-'; + var _strWidth = 'width'; + var _strHeight = 'height'; + var _strFloat = 'float'; + var _strEmpty = ''; + var _strAuto = 'auto'; + var _strScroll = 'scroll'; + var _strHundredPercent = '100%'; + var _strX = 'x'; + var _strY = 'y'; + var _strDot = '.'; + var _strSpace = ' '; + var _strScrollbar = 'scrollbar'; + var _strMinusHorizontal = '-horizontal'; + var _strMinusVertical = '-vertical'; + var _strScrollLeft = _strScroll + 'Left'; + var _strScrollTop = _strScroll + 'Top'; + var _strMouseTouchDownEvent = 'mousedown touchstart'; + var _strMouseTouchUpEvent = 'mouseup touchend touchcancel'; + var _strMouseTouchMoveEvent = 'mousemove touchmove'; + var _strMouseTouchEnter = 'mouseenter'; + var _strMouseTouchLeave = 'mouseleave'; + var _strKeyDownEvent = 'keydown'; + var _strKeyUpEvent = 'keyup'; + var _strSelectStartEvent = 'selectstart'; + var _strTransitionEndEvent = 'transitionend webkitTransitionEnd oTransitionEnd'; + var _strResizeObserverProperty = '__overlayScrollbarsRO__'; + + //class names: + var _cassNamesPrefix = 'os-'; + var _classNameHTMLElement = _cassNamesPrefix + 'html'; + var _classNameHostElement = _cassNamesPrefix + 'host'; + var _classNameHostTextareaElement = _classNameHostElement + '-textarea'; + var _classNameHostScrollbarHorizontalHidden = _classNameHostElement + '-' + _strScrollbar + _strMinusHorizontal + _strMinusHidden; + var _classNameHostScrollbarVerticalHidden = _classNameHostElement + '-' + _strScrollbar + _strMinusVertical + _strMinusHidden; + var _classNameHostTransition = _classNameHostElement + '-transition'; + var _classNameHostRTL = _classNameHostElement + '-rtl'; + var _classNameHostResizeDisabled = _classNameHostElement + '-resize-disabled'; + var _classNameHostScrolling = _classNameHostElement + '-scrolling'; + var _classNameHostOverflow = _classNameHostElement + '-overflow'; + var _classNameHostOverflowX = _classNameHostOverflow + '-x'; + var _classNameHostOverflowY = _classNameHostOverflow + '-y'; + var _classNameTextareaElement = _cassNamesPrefix + 'textarea'; + var _classNameTextareaCoverElement = _classNameTextareaElement + '-cover'; + var _classNamePaddingElement = _cassNamesPrefix + 'padding'; + var _classNameViewportElement = _cassNamesPrefix + 'viewport'; + var _classNameViewportNativeScrollbarsInvisible = _classNameViewportElement + '-native-scrollbars-invisible'; + var _classNameViewportNativeScrollbarsOverlaid = _classNameViewportElement + '-native-scrollbars-overlaid'; + var _classNameContentElement = _cassNamesPrefix + 'content'; + var _classNameContentArrangeElement = _cassNamesPrefix + 'content-arrange'; + var _classNameContentGlueElement = _cassNamesPrefix + 'content-glue'; + var _classNameSizeAutoObserverElement = _cassNamesPrefix + 'size-auto-observer'; + var _classNameResizeObserverElement = _cassNamesPrefix + 'resize-observer'; + var _classNameResizeObserverItemElement = _cassNamesPrefix + 'resize-observer-item'; + var _classNameResizeObserverItemFinalElement = _classNameResizeObserverItemElement + '-final'; + var _classNameTextInherit = _cassNamesPrefix + 'text-inherit'; + var _classNameScrollbar = _cassNamesPrefix + _strScrollbar; + var _classNameScrollbarTrack = _classNameScrollbar + '-track'; + var _classNameScrollbarTrackOff = _classNameScrollbarTrack + '-off'; + var _classNameScrollbarHandle = _classNameScrollbar + '-handle'; + var _classNameScrollbarHandleOff = _classNameScrollbarHandle + '-off'; + var _classNameScrollbarUnusable = _classNameScrollbar + '-unusable'; + var _classNameScrollbarAutoHidden = _classNameScrollbar + '-' + _strAuto + _strMinusHidden; + var _classNameScrollbarCorner = _classNameScrollbar + '-corner'; + var _classNameScrollbarCornerResize = _classNameScrollbarCorner + '-resize'; + var _classNameScrollbarCornerResizeB = _classNameScrollbarCornerResize + '-both'; + var _classNameScrollbarCornerResizeH = _classNameScrollbarCornerResize + _strMinusHorizontal; + var _classNameScrollbarCornerResizeV = _classNameScrollbarCornerResize + _strMinusVertical; + var _classNameScrollbarHorizontal = _classNameScrollbar + _strMinusHorizontal; + var _classNameScrollbarVertical = _classNameScrollbar + _strMinusVertical; + var _classNameDragging = _cassNamesPrefix + 'dragging'; + var _classNameThemeNone = _cassNamesPrefix + 'theme-none'; + + //options: + var _defaultOptions; + var _currentOptions; + var _currentPreparedOptions; + + //extensions: + var _extensions = { }; + var _extensionsPrivateMethods = "added removed on contract"; + + //update + var _lastUpdateTime; + var _swallowedUpdateParams = { }; + var _swallowedUpdateTimeout; + var _swallowUpdateLag = 42; + var _imgs = [ ]; + + //DOM elements: + var _windowElement; + var _documentElement; + var _htmlElement; + var _bodyElement; + var _targetElement; //the target element of this OverlayScrollbars object + var _hostElement; //the host element of this OverlayScrollbars object -> may be the same as targetElement + var _sizeAutoObserverElement; //observes size auto changes + var _sizeObserverElement; //observes size and padding changes + var _contentGlueElement; //has always the size of the content element + var _paddingElement; //manages the padding + var _viewportElement; //is the viewport of our scrollbar model + var _contentArrangeElement; //is needed for correct sizing of the content element (only if native scrollbars are overlays) + var _contentElement; //the element which holds the content + var _textareaCoverElement; //only applied if target is a textarea element. Used for correct size calculation and for prevention of uncontrolled scrolling + var _scrollbarCornerElement; + var _scrollbarHorizontalElement; + var _scrollbarHorizontalTrackElement; + var _scrollbarHorizontalHandleElement; + var _scrollbarVerticalElement; + var _scrollbarVerticalTrackElement; + var _scrollbarVerticalHandleElement; + + //Cache: + var _hostSizeCache; + var _contentScrollSizeCache; + var _arrangeContentSizeCache; + var _hasOverflowCache; + var _hideOverflowCache; + var _widthAutoCache; + var _heightAutoCache; + var _cssMaxValueCache; + var _cssBoxSizingCache; + var _cssPaddingCache; + var _cssBorderCache; + var _cssMarginCache; + var _cssDirectionCache; + var _cssDirectionDetectedCache; + var _paddingAbsoluteCache; + var _clipAlwaysCache; + var _contentGlueSizeCache; + var _overflowBehaviorCache; + var _overflowAmountCache; + var _ignoreOverlayScrollbarHidingCache; + var _autoUpdateCache; + var _sizeAutoCapableCache; + var _textareaAutoWrappingCache; + var _textareaInfoCache; + var _updateAutoHostElementIdCache; + var _updateAutoHostElementClassCache; + var _updateAutoHostElementStyleCache; + var _updateAutoHostElementVisibleCache; + var _updateAutoTargetElementRowsCache; + var _updateAutoTargetElementColsCache; + var _updateAutoTargetElementWrapCache; + var _contentElementScrollSizeChangeDetectedCache; + var _hostElementSizeChangeDetectedCache; + var _scrollbarsVisibilityCache; + var _scrollbarsAutoHideCache; + var _scrollbarsClickScrollingCache; + var _scrollbarsDragScrollingCache; + var _resizeCache; + var _normalizeRTLCache; + var _classNameCache; + var _oldClassName; + var _textareaDynHeightCache; + var _textareaDynWidthCache; + var _bodyMinSizeCache; + var _viewportScrollSizeCache; + var _displayIsHiddenCache; + + //MutationObserver: + var _mutationObserverContentLag = 11; + var _mutationObserverHost; + var _mutationObserverContent; + var _mutationObserverConnected; + var _supportMutationObserver; + + //textarea: + var _textareaKeyDownRestrictedKeyCodes = [ + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123, //F1 to F12 + 33, 34, //page up, page down + 37, 38, 39, 40, //left, up, right, down arrows + 16, 17, 18, 19, 20, 144 //Shift, Ctrl, Alt, Pause, CapsLock, NumLock + ]; + var _textareaKeyDownKeyCodesList = [ ]; + var _textareaUpdateIntervalID; + var _textareaHasFocus; + + //scrollbars: + var _scrollbarsAutoHideTimeoutId; + var _scrollbarsAutoHideMoveTimeoutId; + var _scrollbarsAutoHideDelay; + var _scrollbarsAutoHideNever; + var _scrollbarsAutoHideScroll; + var _scrollbarsAutoHideMove; + var _scrollbarsAutoHideLeave; + var _scrollbarsTouchSupport; + var _scrollbarsAutoHideFlagScrollAndHovered; + + //resize + var _resizeReconnectMutationObserver; + var _resizeNone; + var _resizeBoth; + var _resizeHorizontal; + var _resizeVertical; + var _resizeDragStartPosition = { }; + var _resizeDragStartSize = { }; + + + //==== Add / Remove Passive Event Listener ====// + + /** + * Adds a passive event listener to the given element. + * @param element The element to which the event listener shall be applied. + * @param eventNames The name(s) of the event listener. + * @param listener The listener method which shall be called. + */ + function addPassiveEventListener(element, eventNames, listener) { + var events = eventNames.split(_strSpace); + for (var i = 0; i < events.length; i++) + element[0].addEventListener(events[i], listener, {passive: true}); + } + + /** + * Removes a passive event listener to the given element. + * @param element The element from which the event listener shall be removed. + * @param eventNames The name(s) of the event listener. + * @param listener The listener method which shall be removed. + */ + function removePassiveEventListener(element, eventNames, listener) { + var events = eventNames.split(_strSpace); + for (var i = 0; i < events.length; i++) + element[0].removeEventListener(events[i], listener, {passive: true}); + } + + + //==== Add / Remove / Freeze / Unfreeze Resize Observer ====// + + /** + * Adds a resize observer to the given element. + * @param targetElement The element to which the resize observer shall be applied. + * @param onElementResizedCallback The callback which is fired every time the resize observer registers a size change. + */ + function addResizeObserver(targetElement, onElementResizedCallback) { + var constMaximum = 3333333; + var resizeObserver = COMPATIBILITY.rO(); + var strAnimationStartEvent = 'animationstart mozAnimationStart webkitAnimationStart MSAnimationStart'; + var strChildNodes = 'childNodes'; + var callback = function () { + targetElement[_strScrollTop](constMaximum)[_strScrollLeft](_isRTL ? _rtlScrollBehavior.n ? -constMaximum : _rtlScrollBehavior.i ? 0 : constMaximum : constMaximum); + onElementResizedCallback(); + }; + if (_supportResizeObserver) { + var element = targetElement.append(generateDiv(_classNameResizeObserverElement + ' observed')).contents()[0]; + var observer = element[_strResizeObserverProperty] = new resizeObserver(callback); + observer.observe(element); + } + else { + if (_msieVersion > 9 || !_autoUpdateRecommended) { + targetElement.prepend( + generateDiv(_classNameResizeObserverElement, + generateDiv({ className : _classNameResizeObserverItemElement, dir : "ltr" }, + generateDiv(_classNameResizeObserverItemElement, + generateDiv(_classNameResizeObserverItemFinalElement) + ) + + generateDiv(_classNameResizeObserverItemElement, + generateDiv({ className : _classNameResizeObserverItemFinalElement, style : 'width: 200%; height: 200%' }) + ) + ) + ) + ); + + var observerElement = targetElement[0][strChildNodes][0][strChildNodes][0]; + var shrinkElement = FRAMEWORK(observerElement[strChildNodes][1]); + var expandElement = FRAMEWORK(observerElement[strChildNodes][0]); + var expandElementChild = FRAMEWORK(expandElement[0][strChildNodes][0]); + var widthCache = observerElement[LEXICON.oW]; + var heightCache = observerElement[LEXICON.oH]; + var isDirty; + var rAFId; + var currWidth; + var currHeight; + var factor = 2; + var nativeScrollbarSize = globals.nativeScrollbarSize; //care don't make changes to this object!!! + var reset = function () { + /* + var sizeResetWidth = observerElement[LEXICON.oW] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y; + var sizeResetHeight = observerElement[LEXICON.oH] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y; + var expandChildCSS = {}; + expandChildCSS[_strWidth] = sizeResetWidth; + expandChildCSS[_strHeight] = sizeResetHeight; + expandElementChild.css(expandChildCSS); + + + expandElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight); + shrinkElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight); + */ + expandElement[_strScrollLeft](constMaximum)[_strScrollTop](constMaximum); + shrinkElement[_strScrollLeft](constMaximum)[_strScrollTop](constMaximum); + }; + var onResized = function () { + rAFId = 0; + if (!isDirty) + return; + + widthCache = currWidth; + heightCache = currHeight; + callback(); + }; + var onScroll = function (event) { + currWidth = observerElement[LEXICON.oW]; + currHeight = observerElement[LEXICON.oH]; + isDirty = currWidth != widthCache || currHeight != heightCache; + + if (event && isDirty && !rAFId) { + COMPATIBILITY.cAF()(rAFId); + rAFId = COMPATIBILITY.rAF()(onResized); + } + else if(!event) + onResized(); + + reset(); + if (event) { + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + } + return false; + }; + var expandChildCSS = {}; + var observerElementCSS = {}; + + observerElementCSS[_strTop] = (-((nativeScrollbarSize.y + 1) * factor)); + observerElementCSS[_strRight] = (nativeScrollbarSize.x * -factor); + observerElementCSS[_strBottom] = (nativeScrollbarSize.y * -factor); + observerElementCSS[_strLeft] = (-((nativeScrollbarSize.x + 1) * factor)); + + FRAMEWORK(observerElement).css(observerElementCSS); + expandElement.on(_strScroll, onScroll); + shrinkElement.on(_strScroll, onScroll); + targetElement.on(strAnimationStartEvent, function () { + onScroll(false); + }); + //lets assume that the divs will never be that large and a constant value is enough + expandChildCSS[_strWidth] = constMaximum; + expandChildCSS[_strHeight] = constMaximum; + expandElementChild.css(expandChildCSS); + + reset(); + } + else { + var doc = _documentElement[0]; + var attachEvent = doc.attachEvent; + var isIE = _msieVersion !== undefined; + if (attachEvent) { + targetElement.prepend(generateDiv(_classNameResizeObserverElement)); + findFirst(targetElement, _strDot + _classNameResizeObserverElement)[0].attachEvent('onresize', callback); + } + else { + var obj = doc.createElement(TYPES.o); + obj.setAttribute('tabindex', '-1'); + obj.setAttribute(LEXICON.c, _classNameResizeObserverElement); + obj.onload = function () { + var wnd = this.contentDocument.defaultView; + wnd.addEventListener('resize', callback); + wnd.document.documentElement.style.display = 'none'; + }; + obj.type = 'text/html'; + if (isIE) + targetElement.prepend(obj); + obj.data = 'about:blank'; + if (!isIE) + targetElement.prepend(obj); + targetElement.on(strAnimationStartEvent, callback); + } + } + } + + //direction change detection: + if (targetElement[0] === _sizeObserverElement[0]) { + var directionChanged = function () { + var dir = _hostElement.css('direction'); + var css = {}; + var scrollLeftValue = 0; + var result = false; + if (dir !== _cssDirectionDetectedCache) { + if (dir === 'ltr') { + css[_strLeft] = 0; + css[_strRight] = _strAuto; + scrollLeftValue = constMaximum; + } + else { + css[_strLeft] = _strAuto; + css[_strRight] = 0; + scrollLeftValue = _rtlScrollBehavior.n ? -constMaximum : _rtlScrollBehavior.i ? 0 : constMaximum; + } + _sizeObserverElement.children().eq(0).css(css); + targetElement[_strScrollLeft](scrollLeftValue)[_strScrollTop](constMaximum); + _cssDirectionDetectedCache = dir; + result = true; + } + return result; + }; + directionChanged(); + targetElement.on(_strScroll, function (event) { + if (directionChanged()) + update(); + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + return false; + }); + } + } + + /** + * Removes a resize observer from the given element. + * @param targetElement The element to which the target resize observer is applied. + */ + function removeResizeObserver(targetElement) { + if (_supportResizeObserver) { + var element = targetElement.contents()[0]; + element[_strResizeObserverProperty].disconnect(); + delete element[_strResizeObserverProperty]; + } + else { + remove(targetElement.children(_strDot + _classNameResizeObserverElement).eq(0)); + } + } + + /** + * Freezes the given resize observer. + * @param targetElement The element to which the target resize observer is applied. + */ + function freezeResizeObserver(targetElement) { + if (targetElement !== undefined) { + /* + if (_supportResizeObserver) { + var element = targetElement.contents()[0]; + element[_strResizeObserverProperty].unobserve(element); + } + else { + targetElement = targetElement.children(_strDot + _classNameResizeObserverElement).eq(0); + var w = targetElement.css(_strWidth); + var h = targetElement.css(_strHeight); + var css = {}; + css[_strWidth] = w; + css[_strHeight] = h; + targetElement.css(css); + } + */ + } + } + + /** + * Unfreezes the given resize observer. + * @param targetElement The element to which the target resize observer is applied. + */ + function unfreezeResizeObserver(targetElement) { + if (targetElement !== undefined) { + /* + if (_supportResizeObserver) { + var element = targetElement.contents()[0]; + element[_strResizeObserverProperty].observe(element); + } + else { + var css = { }; + css[_strHeight] = _strEmpty; + css[_strWidth] = _strEmpty; + targetElement.children(_strDot + _classNameResizeObserverElement).eq(0).css(css); + } + */ + } + } + + + //==== Connect / Disconnect Mutation Observer ====// + + /** + * Connects the MutationObservers if they are supported. + */ + function mutationObserversConnect() { + if (_supportMutationObserver && !_mutationObserverConnected) { + _mutationObserverHost.observe(_hostElement[0], { + attributes: true, + attributeOldValue: true, + attributeFilter: [LEXICON.i, LEXICON.c, LEXICON.s] + }); + + _mutationObserverContent.observe(_isTextarea ? _targetElement[0] : _contentElement[0], { + attributes: true, + attributeOldValue: true, + subtree: !_isTextarea, + childList: !_isTextarea, + characterData: !_isTextarea, + attributeFilter: _isTextarea ? ['wrap', 'cols', 'rows'] : [LEXICON.i, LEXICON.c, LEXICON.s] + }); + + _mutationObserverConnected = true; + } + } + + /** + * Disconnects the MutationObservers if they are supported. + */ + function mutationObserversDisconnect() { + if (_supportMutationObserver && _mutationObserverConnected) { + _mutationObserverHost.disconnect(); + _mutationObserverContent.disconnect(); + + _mutationObserverConnected = false; + } + } + + + //==== Events of elements ====// + + /** + * This method gets called every time the host element gets resized. IMPORTANT: Padding changes are detected too!! + * It refreshes the hostResizedEventArgs and the hostSizeResizeCache. + * If there are any size changes, the update method gets called. + */ + function hostOnResized() { + if (_isSleeping) + return; + var measureElement = _sizeObserverElement[0]; + var hostSize = { + w: measureElement[LEXICON.sW], + h: measureElement[LEXICON.sH] + }; + if (_initialized) { + var changed = checkCacheDouble(hostSize, _hostElementSizeChangeDetectedCache); + _hostElementSizeChangeDetectedCache = hostSize; + if (changed) + update(true, false); + } + else { + _hostElementSizeChangeDetectedCache = hostSize; + } + } + + /** + * The mouse enter event of the host element. This event is only needed for the autoHide feature. + */ + function hostOnMouseEnter() { + if (_scrollbarsAutoHideLeave) + refreshScrollbarsAutoHide(true); + } + + /** + * The mouse leave event of the host element. This event is only needed for the autoHide feature. + */ + function hostOnMouseLeave() { + if (_scrollbarsAutoHideLeave && !_bodyElement.hasClass(_classNameDragging)) + refreshScrollbarsAutoHide(false); + } + + /** + * The mouse move event of the host element. This event is only needed for the autoHide "move" feature. + */ + function hostOnMouseMove() { + if (_scrollbarsAutoHideMove) { + refreshScrollbarsAutoHide(true); + clearTimeout(_scrollbarsAutoHideMoveTimeoutId); + _scrollbarsAutoHideMoveTimeoutId = setTimeout(function () { + if (_scrollbarsAutoHideMove && !_destroyed) + refreshScrollbarsAutoHide(false); + }, 100); + } + } + + /** + * The scroll event of the viewport element. That is the main scroll event. It controls also the "scroll", "scrollStart" and "scrollStop" callbacks. + * @param event The scroll event. + */ + function viewportOnScroll(event) { + if (_isSleeping) + return; + + if (_scrollStopTimeoutId !== undefined) + clearTimeout(_scrollStopTimeoutId); + else { + if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) + refreshScrollbarsAutoHide(true); + + if (!nativeOverlayScrollbarsAreActive()) + addClass(_hostElement, _classNameHostScrolling); + + callCallback("onScrollStart", event); + } + + refreshScrollbarHandleOffset(true, _viewportElement[_strScrollLeft]()); + refreshScrollbarHandleOffset(false, _viewportElement[_strScrollTop]()); + callCallback("onScroll", event); + + _scrollStopTimeoutId = setTimeout(function () { + if(!_destroyed) { + viewportOnScrollStop(); + callCallback("onScrollStop", event); + } + }, _scrollStopDelay); + } + + /** + * This method gets called if the scroll event stopped for a specified amount of time. + */ + function viewportOnScrollStop() { + clearTimeout(_scrollStopTimeoutId); + _scrollStopTimeoutId = undefined; + if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) + refreshScrollbarsAutoHide(false); + + if (!nativeOverlayScrollbarsAreActive()) + removeClass(_hostElement, _classNameHostScrolling); + } + + /** + * The key input event of the textarea element. + */ + function textareaOnInput() { + textareaUpdate(); + _base.update(_strAuto); + } + + /** + * The key down event of the textarea element. Is only applied if the input event isn't fully supported. + * @param event The key down event. + */ + function textareaOnKeyDown(event) { + var keyCode = event.keyCode; + if (textareaIsRestrictedKeyCode(keyCode)) + return; + if (_textareaKeyDownKeyCodesList.length === 0) { + var action = function () { + textareaUpdate(); + _base.update(_strAuto); + }; + action(); + _textareaUpdateIntervalID = setInterval(action, 1000 / 60); + } + if (FRAMEWORK.inArray(keyCode, _textareaKeyDownKeyCodesList) === -1) + _textareaKeyDownKeyCodesList.push(keyCode); + } + + /** + * The key up event of the textarea element. Is only applied if the input event isn't fully supported. + * @param event The key up event. + */ + function textareaOnKeyUp(event) { + var keyCode = event.keyCode; + if (textareaIsRestrictedKeyCode(keyCode)) + return; + var index = FRAMEWORK.inArray(keyCode, _textareaKeyDownKeyCodesList); + if (index > -1) + _textareaKeyDownKeyCodesList.splice(index, 1); + if (_textareaKeyDownKeyCodesList.length === 0) { + textareaUpdate(); + _base.update(_strAuto); + clearInterval(_textareaUpdateIntervalID); + } + } + + /** + * The drop event of the textarea element. + */ + function textareaOnDrop() { + setTimeout(function () { + if(!_destroyed) { + textareaUpdate(); + _base.update(_strAuto); + } + }, 50); + } + + /** + * The focus event of the textarea element. + */ + function textareaOnFocus() { + _textareaHasFocus = true; + } + + /** + * The focus out event of the textarea element. + */ + function textareaOnFocusOut() { + _textareaHasFocus = false; + clearInterval(_textareaUpdateIntervalID); + _textareaKeyDownKeyCodesList = [ ]; + textareaUpdate(); + _base.update(_strAuto); + } + + /** + * The scroll event of the textarea element. + * @param event The scroll event. + */ + function textareaOnScroll(event) { + _targetElement[_strScrollLeft](_rtlScrollBehavior.i && _normalizeRTLCache ? 9999999 : 0); + _targetElement[_strScrollTop](0); + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + return false; + } + + /** + * The mouse down event of the scrollbar corner element. + * @param event The mouse down event. + */ + function scrollbarCornerOnMouseDown(event) { + if (_isSleeping) + return; + + var originalEvent = event.originalEvent || event; + var isTouchEvent = originalEvent.touches !== undefined; + + if (COMPATIBILITY.mBtn(event) === 1 || isTouchEvent) { + if (_mutationObserverConnected) { + _resizeReconnectMutationObserver = true; + mutationObserversDisconnect(); + } + + _resizeDragStartPosition = COMPATIBILITY.page(event); + + _resizeDragStartSize.w = _hostElement[0][LEXICON.oW] - (!_isBorderBox ? _paddingX : 0); + _resizeDragStartSize.h = _hostElement[0][LEXICON.oH] - (!_isBorderBox ? _paddingY : 0); + + _documentElement.on(_strSelectStartEvent, documentOnSelectStart) + .on(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .on(_strMouseTouchUpEvent, scrollbarCornerOnResized); + + addClass(_bodyElement, _classNameDragging); + if (_scrollbarCornerElement.setCapture) + _scrollbarCornerElement.setCapture(); + + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + } + } + + /** + * The mouse move event if the scrollbar corner element is resizable and gets dragged. + * @param event The mouse move event. + */ + function scrollbarCornerOnResize(event) { + var pageOffset = COMPATIBILITY.page(event); + var hostElementCSS = { }; + if (_resizeHorizontal || _resizeBoth) + hostElementCSS[_strWidth] = (_resizeDragStartSize.w + pageOffset.x - _resizeDragStartPosition.x); + if (_resizeVertical || _resizeBoth) + hostElementCSS[_strHeight] = (_resizeDragStartSize.h + pageOffset.y - _resizeDragStartPosition.y); + _hostElement.css(hostElementCSS); + COMPATIBILITY.stpP(event); + } + + /** + * The mouse up event if the scrollbar corner element is resizable and was dragged and now the mouse button is released. + * @param event The mouse up event. + */ + function scrollbarCornerOnResized(event) { + var eventIsTrusted = event !== undefined; + + _documentElement.off(_strSelectStartEvent, documentOnSelectStart) + .off(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .off(_strMouseTouchUpEvent, scrollbarCornerOnResized); + + removeClass(_bodyElement, _classNameDragging); + if (_scrollbarCornerElement.releaseCapture) + _scrollbarCornerElement.releaseCapture(); + + if (eventIsTrusted) { + if (_resizeReconnectMutationObserver) + mutationObserversConnect(); + _base.update(_strAuto); + } + _resizeReconnectMutationObserver = false; + } + + /** + * Prevents text from deselection if attached to the document element on the mousedown event of a DOM element. + * @param event The select start event. + */ + function documentOnSelectStart(event) { + COMPATIBILITY.prvD(event); + return false; + } + + /** + * A callback which will be called after a img element has downloaded its src asynchronous. + */ + function imgOnLoad() { + update(); + } + + + //==== Update Detection ====// + + /** + * Measures the min width and min height of the body element and refreshes the related cache. + * @returns {boolean} True if the min width or min height has changed, false otherwise. + */ + function bodyMinSizeChanged() { + var bodyMinSize = {}; + if (_isBody && _contentArrangeElement) { + bodyMinSize.w = parseToZeroOrNumber(_contentArrangeElement.css(_strMinMinus + _strWidth)); + bodyMinSize.h = parseToZeroOrNumber(_contentArrangeElement.css(_strMinMinus + _strHeight)); + bodyMinSize.c = checkCacheDouble(bodyMinSize, _bodyMinSizeCache); + bodyMinSize.f = true; //flag for "measured at least once" + } + _bodyMinSizeCache = bodyMinSize; + return bodyMinSize.c || false; + } + + /** + * Returns true if the class names really changed (new class without plugin host prefix) + * @param oldCassNames The old ClassName string. + * @param newClassNames The new ClassName string. + * @returns {boolean} True if the class names has really changed, false otherwise. + */ + function hostClassNamesChanged(oldCassNames, newClassNames) { + var currClasses = (newClassNames !== undefined && newClassNames !== null) ? newClassNames.split(_strSpace) : _strEmpty; + var oldClasses = (oldCassNames !== undefined && oldCassNames !== null) ? oldCassNames.split(_strSpace) : _strEmpty; + if (currClasses === _strEmpty && oldClasses === _strEmpty) + return false; + var diff = getArrayDifferences(oldClasses, currClasses); + var changed = false; + var oldClassNames = _oldClassName !== undefined && _oldClassName !== null ? _oldClassName.split(_strSpace) : [_strEmpty]; + var currClassNames = _classNameCache !== undefined && _classNameCache !== null ? _classNameCache.split(_strSpace) : [_strEmpty]; + + //remove none theme from diff list to prevent update + var idx = FRAMEWORK.inArray(_classNameThemeNone, diff); + var curr = diff[i]; + var i; + var v; + var o; + var c; + + if (idx > -1) + diff.splice(idx, 1); + + for (i = 0; i < diff.length; i++) { + curr = diff[i]; + if (curr.indexOf(_classNameHostElement) !== 0) { + o = true; + c = true; + for (v = 0; v < oldClassNames.length; v++) { + if (curr === oldClassNames[v]) { + o = false; + break; + } + } + for (v = 0; v < currClassNames.length; v++) { + if (curr === currClassNames[v]) { + c = false; + break; + } + } + if (o && c) { + changed = true; + break; + } + } + + } + return changed; + } + + /** + * Returns true if the given mutation is not from a from the plugin generated element. If the target element is a textarea the mutation is always unknown. + * @param mutation The mutation which shall be checked. + * @returns {boolean} True if the mutation is from a unknown element, false otherwise. + */ + function isUnknownMutation(mutation) { + var attributeName = mutation.attributeName; + var mutationTarget = mutation.target; + var mutationType = mutation.type; + var strClosest = 'closest'; + + if (mutationTarget === _contentElement[0]) + return attributeName === null; + if (mutationType === 'attributes' && (attributeName === LEXICON.c || attributeName === LEXICON.s) && !_isTextarea) { + //only do it of browser support it natively + if (typeof mutationTarget[strClosest] != TYPES.f) + return true; + if (mutationTarget[strClosest](_strDot + _classNameResizeObserverElement) !== null || + mutationTarget[strClosest](_strDot + _classNameScrollbar) !== null || + mutationTarget[strClosest](_strDot + _classNameScrollbarCorner) !== null) + return false; + } + return true; + } + + /** + * Returns true if the content size was changed since the last time this method was called. + * @returns {boolean} True if the content size was changed, false otherwise. + */ + function updateAutoContentSizeChanged() { + if (_isSleeping) + return false; + + var float; + var textareaValueLength = _isTextarea && _widthAutoCache && !_textareaAutoWrappingCache ? _targetElement.val().length : 0; + var setCSS = !_mutationObserverConnected && _widthAutoCache && !_isTextarea; + var viewportScrollSize = { }; + var css = { }; + + //fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1439305, it only works with "clipAlways : true" + //it can work with "clipAlways : false" too, but we had to set the overflow of the viewportElement to hidden every time before measuring + if(_restrictedMeasuring) { + viewportScrollSize = { + x : _viewportElement[0][LEXICON.sW], + y : _viewportElement[0][LEXICON.sH] + } + } + if (setCSS) { + float = _contentElement.css(_strFloat); + css[_strFloat] = _isRTL ? _strRight : _strLeft; + css[_strWidth] = _strAuto; + _contentElement.css(css); + } + var contentElementScrollSize = { + w: getContentMeasureElement()[LEXICON.sW] + textareaValueLength, + h: getContentMeasureElement()[LEXICON.sH] + textareaValueLength + }; + if (setCSS) { + css[_strFloat] = float; + css[_strWidth] = _strHundredPercent; + _contentElement.css(css); + } + + var bodyMinSizeC = bodyMinSizeChanged(); + var changed = checkCacheDouble(contentElementScrollSize, _contentElementScrollSizeChangeDetectedCache); + var viewportScrollSizeChanged = checkCacheDouble(viewportScrollSize, _viewportScrollSizeCache, _strX, _strY); + _contentElementScrollSizeChangeDetectedCache = contentElementScrollSize; + _viewportScrollSizeCache = viewportScrollSize; + + return changed || bodyMinSizeC || viewportScrollSizeChanged; + } + + /** + * Returns true if the host element attributes (id, class, style) was changed since the last time this method was called. + * @returns {boolean} + */ + function meaningfulAttrsChanged() { + if (_isSleeping || _mutationObserverConnected) + return false; + + var hostElementId = _hostElement.attr(LEXICON.i) || _strEmpty; + var hostElementIdChanged = checkCacheSingle(hostElementId, _updateAutoHostElementIdCache); + var hostElementClass = _hostElement.attr(LEXICON.c) || _strEmpty; + var hostElementClassChanged = checkCacheSingle(hostElementClass, _updateAutoHostElementClassCache); + var hostElementStyle = _hostElement.attr(LEXICON.s) || _strEmpty; + var hostElementStyleChanged = checkCacheSingle(hostElementStyle, _updateAutoHostElementStyleCache); + var hostElementVisible = _hostElement.is(':visible') || _strEmpty; + var hostElementVisibleChanged = checkCacheSingle(hostElementVisible, _updateAutoHostElementVisibleCache); + var targetElementRows = _isTextarea ? (_targetElement.attr('rows') || _strEmpty) : _strEmpty; + var targetElementRowsChanged = checkCacheSingle(targetElementRows, _updateAutoTargetElementRowsCache); + var targetElementCols = _isTextarea ? (_targetElement.attr('cols') || _strEmpty) : _strEmpty; + var targetElementColsChanged = checkCacheSingle(targetElementCols, _updateAutoTargetElementColsCache); + var targetElementWrap = _isTextarea ? (_targetElement.attr('wrap') || _strEmpty) : _strEmpty; + var targetElementWrapChanged = checkCacheSingle(targetElementWrap, _updateAutoTargetElementWrapCache); + + _updateAutoHostElementIdCache = hostElementId; + if (hostElementClassChanged) + hostElementClassChanged = hostClassNamesChanged(_updateAutoHostElementClassCache, hostElementClass); + _updateAutoHostElementClassCache = hostElementClass; + _updateAutoHostElementStyleCache = hostElementStyle; + _updateAutoHostElementVisibleCache = hostElementVisible; + _updateAutoTargetElementRowsCache = targetElementRows; + _updateAutoTargetElementColsCache = targetElementCols; + _updateAutoTargetElementWrapCache = targetElementWrap; + + return hostElementIdChanged || hostElementClassChanged || hostElementStyleChanged || hostElementVisibleChanged || targetElementRowsChanged || targetElementColsChanged || targetElementWrapChanged; + } + + /** + * Checks is a CSS Property of a child element is affecting the scroll size of the content. + * @param propertyName The CSS property name. + * @returns {boolean} True if the property is affecting the content scroll size, false otherwise. + */ + function isSizeAffectingCSSProperty(propertyName) { + if (!_initialized) + return true; + var flexGrow = 'flex-grow'; + var flexShrink = 'flex-shrink'; + var flexBasis = 'flex-basis'; + var affectingPropsX = [ + _strWidth, + _strMinMinus + _strWidth, + _strMaxMinus + _strWidth, + _strMarginMinus + _strLeft, + _strMarginMinus + _strRight, + _strLeft, + _strRight, + 'font-weight', + 'word-spacing', + flexGrow, + flexShrink, + flexBasis + ]; + var affectingPropsXContentBox = [ + _strPaddingMinus + _strLeft, + _strPaddingMinus + _strRight, + _strBorderMinus + _strLeft + _strWidth, + _strBorderMinus + _strRight + _strWidth + ]; + var affectingPropsY = [ + _strHeight, + _strMinMinus + _strHeight, + _strMaxMinus + _strHeight, + _strMarginMinus + _strTop, + _strMarginMinus + _strBottom, + _strTop, + _strBottom, + 'line-height', + flexGrow, + flexShrink, + flexBasis + ]; + var affectingPropsYContentBox = [ + _strPaddingMinus + _strTop, + _strPaddingMinus + _strBottom, + _strBorderMinus + _strTop + _strWidth, + _strBorderMinus + _strBottom + _strWidth + ]; + var _strS = 's'; + var _strVS = 'v-s'; + var checkX = _overflowBehaviorCache.x === _strS || _overflowBehaviorCache.x === _strVS; + var checkY = _overflowBehaviorCache.y === _strS || _overflowBehaviorCache.y === _strVS; + var sizeIsAffected = false; + var checkPropertyName = function (arr, name) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === name) + return true; + } + return false; + }; + + if (checkY) { + sizeIsAffected = checkPropertyName(affectingPropsY, propertyName); + if (!sizeIsAffected && !_isBorderBox) + sizeIsAffected = checkPropertyName(affectingPropsYContentBox, propertyName); + } + if (checkX && !sizeIsAffected) { + sizeIsAffected = checkPropertyName(affectingPropsX, propertyName); + if (!sizeIsAffected && !_isBorderBox) + sizeIsAffected = checkPropertyName(affectingPropsXContentBox, propertyName); + } + return sizeIsAffected; + } + + + //==== Update ====// + + /** + * Updates the variables and size of the textarea element, and manages the scroll on new line or new character. + */ + function textareaUpdate() { + if (_isSleeping) + return; + + var wrapAttrOff = !_textareaAutoWrappingCache; + var minWidth = _viewportSize.w - (!_isBorderBox && !_paddingAbsoluteCache && _widthAutoCache ? _paddingY + _borderY : 0); + var minHeight = _viewportSize.h - (!_isBorderBox && !_paddingAbsoluteCache && _heightAutoCache ? _paddingY + _borderY : 0); + var css = { }; + var doMeasure = _widthAutoCache || wrapAttrOff; + var measureElement = _targetElement[0]; + var origWidth; + var width; + var origHeight; + var height; + + //reset min size + css[_strMinMinus + _strWidth] = _strEmpty; + css[_strMinMinus + _strHeight] = _strEmpty; + + //set width auto + css[_strWidth] = _strAuto; + _targetElement.css(css); + + //measure width + origWidth = measureElement[LEXICON.oW]; + width = doMeasure ? Math.max(origWidth, measureElement[LEXICON.sW] - 1) : 1; + width += (_widthAutoCache ? _marginX + (!_isBorderBox ? wrapAttrOff ? 0 : _paddingX + _borderX : 0) : 0); + + //set measured width and height auto + css[_strWidth] = _widthAutoCache ? width : _strHundredPercent; + css[_strHeight] = _strAuto; //_strAuto + _targetElement.css(css); + + //measure height + origHeight = measureElement[LEXICON.oH]; + height = Math.max(origHeight, measureElement[LEXICON.sH] - 1); + + //append correct size values + css[_strWidth] = width; + css[_strHeight] = height; + _textareaCoverElement.css(css); + + //apply min width / min height to prevent textarea collapsing + css[_strMinMinus + _strWidth] = minWidth + (!_isBorderBox && _widthAutoCache ? _paddingX + _borderX : 0); + css[_strMinMinus + _strHeight] = minHeight + (!_isBorderBox && _heightAutoCache ? _paddingY + _borderY : 0); + _targetElement.css(css); + + return { + ow: origWidth, + oh: origHeight, + dw: width, + dh: height + }; + } + + /** + * Updates the plugin and DOM to the current options. + * This method should only be called if a update is 100% required. + * @param hostSizeChanged True if this method was called due to a host size change. + * @param contentSizeChanged True if this method was called due to a content size change. + * @param force True if every property shall be updated and the cache shall be ignored. + * @param preventSwallowing True if this method shall be executed event if it could be swallowed. + */ + function update(hostSizeChanged, contentSizeChanged, force, preventSwallowing) { + var now = COMPATIBILITY.now(); + var swallow = _swallowUpdateLag > 0 && _initialized && (now - _lastUpdateTime) < _swallowUpdateLag && (!_heightAutoCache && !_widthAutoCache) && !preventSwallowing; + var displayIsHidden = _hostElement.is(':hidden'); + var displayIsHiddenChanged = checkCacheSingle(displayIsHidden, _displayIsHiddenCache, force); + _displayIsHiddenCache = displayIsHidden; + clearTimeout(_swallowedUpdateTimeout); + + if (swallow) { + _swallowedUpdateParams.h = hostSizeChanged; + _swallowedUpdateParams.c = contentSizeChanged; + _swallowedUpdateParams.f = force; + _swallowedUpdateTimeout = setTimeout(update, _swallowUpdateLag); + } + + //abort update due to: + //destroyed + //swallowing + //sleeping + //host is hidden or has false display + if (_destroyed || swallow || _isSleeping || (_initialized && !force && displayIsHidden) || _hostElement.css('display') === 'inline') + return; + + _lastUpdateTime = now; + hostSizeChanged = hostSizeChanged || _swallowedUpdateParams.h; + contentSizeChanged = contentSizeChanged || _swallowedUpdateParams.c; + force = force || _swallowedUpdateParams.f; + _swallowedUpdateParams = {}; + + hostSizeChanged = hostSizeChanged === undefined ? false : hostSizeChanged; + contentSizeChanged = contentSizeChanged === undefined ? false : contentSizeChanged; + force = force === undefined ? false : force; + + //if scrollbar styling is possible and native scrollbars aren't overlaid the scrollbar styling will be applied which hides the native scrollbars completely. + if (_nativeScrollbarStyling && !(_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)) { + //native scrollbars are hidden, so change the values to zero + _nativeScrollbarSize.x = 0; + _nativeScrollbarSize.y = 0; + } + else { + //refresh native scrollbar size (in case of zoom) + _nativeScrollbarSize = extend(true, {}, globals.nativeScrollbarSize); + } + + // Scrollbar padding is needed for firefox, because firefox hides scrollbar automatically if the size of the div is too small. + // The calculation: [scrollbar size +3 *3] + // (+3 because of possible decoration e.g. borders, margins etc., but only if native scrollbar is NOT a overlaid scrollbar) + // (*3 because (1)increase / (2)decrease -button and (3)resize handle) + _nativeScrollbarMinSize = { + x: (_nativeScrollbarSize.x + (_nativeScrollbarIsOverlaid.x ? 0 : 3)) * 3, + y: (_nativeScrollbarSize.y + (_nativeScrollbarIsOverlaid.y ? 0 : 3)) * 3 + }; + + freezeResizeObserver(_sizeObserverElement); + freezeResizeObserver(_sizeAutoObserverElement); + + //save current scroll offset + var currScroll = { + l: _viewportElement[_strScrollLeft](), + t: _viewportElement[_strScrollTop]() + }; + var currentPreparedOptionsScrollbars = _currentPreparedOptions.scrollbars; + var currentPreparedOptionsTextarea = _currentPreparedOptions.textarea; + + //scrollbars visibility: + var scrollbarsVisibility = currentPreparedOptionsScrollbars.visibility; + var scrollbarsVisibilityChanged = checkCacheSingle(scrollbarsVisibility, _scrollbarsVisibilityCache, force); + + //scrollbars autoHide: + var scrollbarsAutoHide = currentPreparedOptionsScrollbars.autoHide; + var scrollbarsAutoHideChanged = checkCacheSingle(scrollbarsAutoHide, _scrollbarsAutoHideCache, force); + + //scrollbars click scrolling + var scrollbarsClickScrolling = currentPreparedOptionsScrollbars.clickScrolling; + var scrollbarsClickScrollingChanged = checkCacheSingle(scrollbarsClickScrolling, _scrollbarsClickScrollingCache, force); + + //scrollbars drag scrolling + var scrollbarsDragScrolling = currentPreparedOptionsScrollbars.dragScrolling; + var scrollbarsDragScrollingChanged = checkCacheSingle(scrollbarsDragScrolling, _scrollbarsDragScrollingCache, force); + + //className + var className = _currentPreparedOptions.className; + var classNameChanged = checkCacheSingle(className, _classNameCache, force); + + //resize + var resize = _currentPreparedOptions.resize; + var resizeChanged = checkCacheSingle(resize, _resizeCache, force) && !_isBody; //body can't be resized since the window itself acts as resize possibility. + + //textarea AutoWrapping + var textareaAutoWrapping = _isTextarea ? _targetElement.attr('wrap') !== 'off' : false; + var textareaAutoWrappingChanged = checkCacheSingle(textareaAutoWrapping, _textareaAutoWrappingCache, force); + + //paddingAbsolute + var paddingAbsolute = _currentPreparedOptions.paddingAbsolute; + var paddingAbsoluteChanged = checkCacheSingle(paddingAbsolute, _paddingAbsoluteCache, force); + + //clipAlways + var clipAlways = _currentPreparedOptions.clipAlways; + var clipAlwaysChanged = checkCacheSingle(clipAlways, _clipAlwaysCache, force); + + //sizeAutoCapable + var sizeAutoCapable = _currentPreparedOptions.sizeAutoCapable && !_isBody; //body can never be size auto, because it shall be always as big as the viewport. + var sizeAutoCapableChanged = checkCacheSingle(sizeAutoCapable, _sizeAutoCapableCache, force); + + //showNativeScrollbars + var ignoreOverlayScrollbarHiding = _currentPreparedOptions.nativeScrollbarsOverlaid.showNativeScrollbars; + var ignoreOverlayScrollbarHidingChanged = checkCacheSingle(ignoreOverlayScrollbarHiding, _ignoreOverlayScrollbarHidingCache); + + //autoUpdate + var autoUpdate = _currentPreparedOptions.autoUpdate; + var autoUpdateChanged = checkCacheSingle(autoUpdate, _autoUpdateCache); + + //overflowBehavior + var overflowBehavior = _currentPreparedOptions.overflowBehavior; + var overflowBehaviorChanged = checkCacheDouble(overflowBehavior, _overflowBehaviorCache, _strX, _strY, force); + + //dynWidth: + var textareaDynWidth = currentPreparedOptionsTextarea.dynWidth; + var textareaDynWidthChanged = checkCacheSingle(_textareaDynWidthCache, textareaDynWidth); + + //dynHeight: + var textareaDynHeight = currentPreparedOptionsTextarea.dynHeight; + var textareaDynHeightChanged = checkCacheSingle(_textareaDynHeightCache, textareaDynHeight); + + //scrollbars visibility + _scrollbarsAutoHideNever = scrollbarsAutoHide === 'n'; + _scrollbarsAutoHideScroll = scrollbarsAutoHide === 's'; + _scrollbarsAutoHideMove = scrollbarsAutoHide === 'm'; + _scrollbarsAutoHideLeave = scrollbarsAutoHide === 'l'; + + //scrollbars autoHideDelay + _scrollbarsAutoHideDelay = currentPreparedOptionsScrollbars.autoHideDelay; + + //scrollbars support touch + _scrollbarsTouchSupport = currentPreparedOptionsScrollbars.touchSupport; + + //old className + _oldClassName = _classNameCache; + + //resize + _resizeNone = resize === 'n'; + _resizeBoth = resize === 'b'; + _resizeHorizontal = resize === 'h'; + _resizeVertical = resize === 'v'; + + //normalizeRTL + _normalizeRTLCache = _currentPreparedOptions.normalizeRTL; + + //ignore overlay scrollbar hiding + ignoreOverlayScrollbarHiding = ignoreOverlayScrollbarHiding && (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y); + + //refresh options cache + _scrollbarsVisibilityCache = scrollbarsVisibility; + _scrollbarsAutoHideCache = scrollbarsAutoHide; + _scrollbarsClickScrollingCache = scrollbarsClickScrolling; + _scrollbarsDragScrollingCache = scrollbarsDragScrolling; + _classNameCache = className; + _resizeCache = resize; + _textareaAutoWrappingCache = textareaAutoWrapping; + _paddingAbsoluteCache = paddingAbsolute; + _clipAlwaysCache = clipAlways; + _sizeAutoCapableCache = sizeAutoCapable; + _ignoreOverlayScrollbarHidingCache = ignoreOverlayScrollbarHiding; + _autoUpdateCache = autoUpdate; + _overflowBehaviorCache = extend(true, {}, overflowBehavior); + _textareaDynWidthCache = textareaDynWidth; + _textareaDynHeightCache = textareaDynHeight; + _hasOverflowCache = _hasOverflowCache || { x: false, y: false }; + + //set correct class name to the host element + if (classNameChanged) { + removeClass(_hostElement, _oldClassName + _strSpace + _classNameThemeNone); + addClass(_hostElement, className !== undefined && className !== null && className.length > 0 ? className : _classNameThemeNone); + } + + //set correct auto Update + if (autoUpdateChanged) { + if (autoUpdate === true) { + mutationObserversDisconnect(); + autoUpdateLoop.add(_base); + } + else if (autoUpdate === null) { + if (_autoUpdateRecommended) { + mutationObserversDisconnect(); + autoUpdateLoop.add(_base); + } + else { + autoUpdateLoop.remove(_base); + mutationObserversConnect(); + } + } + else { + autoUpdateLoop.remove(_base); + mutationObserversConnect(); + } + } + + //activate or deactivate size auto capability + if (sizeAutoCapableChanged) { + if (sizeAutoCapable) { + if (_contentGlueElement === undefined) { + _contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement)); + _paddingElement.before(_contentGlueElement); + } + if (_sizeAutoObserverAdded) { + _sizeAutoObserverElement.show(); + } + else { + _sizeAutoObserverElement = FRAMEWORK(generateDiv(_classNameSizeAutoObserverElement)); + _contentGlueElement.before(_sizeAutoObserverElement); + var oldSize = {w: -1, h: -1}; + addResizeObserver(_sizeAutoObserverElement, function () { + var newSize = { + w: _sizeAutoObserverElement[0][LEXICON.oW], + h: _sizeAutoObserverElement[0][LEXICON.oH] + }; + if (checkCacheDouble(newSize, oldSize)) { + if (_initialized && (_heightAutoCache && newSize.h > 0) || (_widthAutoCache && newSize.w > 0)) { + update(); + } + else if (_initialized && (!_heightAutoCache && newSize.h === 0) || (!_widthAutoCache && newSize.w === 0)) { + update(); + } + } + oldSize = newSize; + }); + _sizeAutoObserverAdded = true; + //fix heightAuto detector bug if height is fixed but contentHeight is 0. + //the probability this bug will ever happen is very very low, thats why its ok if we use calc which isn't supported in IE8. + if (_cssCalc !== null) + _sizeAutoObserverElement.css(_strHeight, _cssCalc + '(100% + 1px)'); + } + } + else { + if (_sizeAutoObserverAdded) + _sizeAutoObserverElement.hide(); + } + } + + //if force, update all resizeObservers too + if (force) { + _sizeObserverElement.find('*').trigger(_strScroll); + if (_sizeAutoObserverAdded) + _sizeAutoObserverElement.find('*').trigger(_strScroll); + } + + //detect direction: + var cssDirection = _hostElement.css('direction'); + var cssDirectionChanged = checkCacheSingle(cssDirection, _cssDirectionCache, force); + + //detect box-sizing: + var boxSizing = _hostElement.css('box-sizing'); + var boxSizingChanged = checkCacheSingle(boxSizing, _cssBoxSizingCache, force); + + //detect padding: + var padding = { + c: force, + t: parseToZeroOrNumber(_hostElement.css(_strPaddingMinus + _strTop)), + r: parseToZeroOrNumber(_hostElement.css(_strPaddingMinus + _strRight)), + b: parseToZeroOrNumber(_hostElement.css(_strPaddingMinus + _strBottom)), + l: parseToZeroOrNumber(_hostElement.css(_strPaddingMinus + _strLeft)) + }; + + //width + height auto detecting var: + var sizeAutoObserverElementBCRect; + //exception occurs in IE8 sometimes (unknown exception) + try { + sizeAutoObserverElementBCRect = _sizeAutoObserverAdded ? _sizeAutoObserverElement[0].getBoundingClientRect() : null; + } catch (ex) { + return; + } + + _isRTL = cssDirection === 'rtl'; + _isBorderBox = (boxSizing === 'border-box'); + var isRTLLeft = _isRTL ? _strLeft : _strRight; + var isRTLRight = _isRTL ? _strRight : _strLeft; + var hostElement = _hostElement[0]; + var paddingElement = _paddingElement[0]; + + //detect width auto: + var widthAutoResizeDetection = false; + var widthAutoObserverDetection = (_sizeAutoObserverAdded && (_hostElement.css(_strFloat) !== 'none' /*|| _isTextarea */)) ? (Math.round(sizeAutoObserverElementBCRect.right - sizeAutoObserverElementBCRect.left) === 0) && (!paddingAbsolute ? (hostElement[LEXICON.cW] - _paddingX) > 0 : true) : false; + if (sizeAutoCapable && !widthAutoObserverDetection) { + var tmpCurrHostWidth = hostElement[LEXICON.oW]; + var tmpCurrContentGlueWidth = _contentGlueElement.css(_strWidth); + _contentGlueElement.css(_strWidth, _strAuto); + + var tmpNewHostWidth = hostElement[LEXICON.oW]; + _contentGlueElement.css(_strWidth, tmpCurrContentGlueWidth); + widthAutoResizeDetection = tmpCurrHostWidth !== tmpNewHostWidth; + if (!widthAutoResizeDetection) { + _contentGlueElement.css(_strWidth, tmpCurrHostWidth + 1); + tmpNewHostWidth = hostElement[LEXICON.oW]; + _contentGlueElement.css(_strWidth, tmpCurrContentGlueWidth); + widthAutoResizeDetection = tmpCurrHostWidth !== tmpNewHostWidth; + } + } + var widthAuto = (widthAutoObserverDetection || widthAutoResizeDetection) && sizeAutoCapable && !displayIsHidden; + var widthAutoChanged = checkCacheSingle(widthAuto, _widthAutoCache, force); + var wasWidthAuto = !widthAuto && _widthAutoCache; + + //detect height auto: + var heightAuto = _sizeAutoObserverAdded && !displayIsHidden ? (Math.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false; + var heightAutoChanged = checkCacheSingle(heightAuto, _heightAutoCache, force); + var wasHeightAuto = !heightAuto && _heightAutoCache; + + //detect border: + //we need the border only if border box and auto size + var strMinusWidth = '-' + _strWidth; + var updateBorderX = (widthAuto && _isBorderBox) || !_isBorderBox; + var updateBorderY = (heightAuto && _isBorderBox) || !_isBorderBox; + var border = { + c: force, + t: updateBorderY ? parseToZeroOrNumber(_hostElement.css(_strBorderMinus + _strTop + strMinusWidth), true) : 0, + r: updateBorderX ? parseToZeroOrNumber(_hostElement.css(_strBorderMinus + _strRight + strMinusWidth), true) : 0, + b: updateBorderY ? parseToZeroOrNumber(_hostElement.css(_strBorderMinus + _strBottom + strMinusWidth), true) : 0, + l: updateBorderX ? parseToZeroOrNumber(_hostElement.css(_strBorderMinus + _strLeft + strMinusWidth), true) : 0 + }; + + //detect margin: + var margin = { + c: force, + t: parseToZeroOrNumber(_hostElement.css(_strMarginMinus + _strTop)), + r: parseToZeroOrNumber(_hostElement.css(_strMarginMinus + _strRight)), + b: parseToZeroOrNumber(_hostElement.css(_strMarginMinus + _strBottom)), + l: parseToZeroOrNumber(_hostElement.css(_strMarginMinus + _strLeft)) + }; + + //detect css max width & height: + var cssMaxValue = { + h: String(_hostElement.css(_strMaxMinus + _strHeight)), + w: String(_hostElement.css(_strMaxMinus + _strWidth)) + }; + + //vars to apply correct css + var contentElementCSS = { }; + var contentGlueElementCSS = { }; + + //funcs + var getHostSize = function() { + return { + w: hostElement[LEXICON.cW], + h: hostElement[LEXICON.cH] + }; + }; + var getViewportSize = function() { + var brect = paddingElement.getBoundingClientRect() + return brect[_strWidth] + ? { + w: brect[_strWidth], + h: brect[_strHeight] + } : { + w: paddingElement[LEXICON.oW], + h: paddingElement[LEXICON.oH] + }; + }; + + //set info for padding + _paddingX = padding.l + padding.r; + _paddingY = padding.t + padding.b; + padding.ax = paddingAbsolute ? _paddingX : 0; + padding.ay = paddingAbsolute ? _paddingY : 0; + padding.c = checkCacheTRBL(padding, _cssPaddingCache); + + //set info for border + _borderX = border.l + border.r; + _borderY = border.t + border.b; + border.c = checkCacheTRBL(border, _cssBorderCache); + + //set info for margin + _marginX = margin.l + margin.r; + _marginY = margin.t + margin.b; + margin.c = checkCacheTRBL(margin, _cssMarginCache); + + //set info for css max value + cssMaxValue.ih = parseToZeroOrNumber(cssMaxValue.h); //ih = integer height + cssMaxValue.iw = parseToZeroOrNumber(cssMaxValue.w); //iw = integer width + cssMaxValue.ch = cssMaxValue.h.indexOf('px') > -1; //ch = correct height + cssMaxValue.cw = cssMaxValue.w.indexOf('px') > -1; //cw = correct width + cssMaxValue.c = checkCacheDouble(cssMaxValue, _cssMaxValueCache, force); + + //refresh cache + _cssDirectionCache = cssDirection; + _cssBoxSizingCache = boxSizing; + _widthAutoCache = widthAuto; + _heightAutoCache = heightAuto; + _cssPaddingCache = padding; + _cssBorderCache = border; + _cssMarginCache = margin; + _cssMaxValueCache = cssMaxValue; + + //IEFix direction changed + if (cssDirectionChanged && _sizeAutoObserverAdded) + _sizeAutoObserverElement.css(_strFloat, isRTLRight); + + //apply padding: + if (padding.c || cssDirectionChanged || paddingAbsoluteChanged || widthAutoChanged || heightAutoChanged || boxSizingChanged || sizeAutoCapableChanged) { + var paddingElementCSS = {}; + var textareaCSS = {}; + setTopRightBottomLeft(contentGlueElementCSS, _strMarginMinus, [-padding.t, -padding.r, -padding.b, -padding.l]); + if (paddingAbsolute) { + setTopRightBottomLeft(paddingElementCSS, _strEmpty, [padding.t, padding.r, padding.b, padding.l]); + if (_isTextarea) + setTopRightBottomLeft(textareaCSS, _strPaddingMinus); + else + setTopRightBottomLeft(contentElementCSS, _strPaddingMinus); + } + else { + setTopRightBottomLeft(paddingElementCSS, _strEmpty); + if (_isTextarea) + setTopRightBottomLeft(textareaCSS, _strPaddingMinus, [padding.t, padding.r, padding.b, padding.l]); + else + setTopRightBottomLeft(contentElementCSS, _strPaddingMinus, [padding.t, padding.r, padding.b, padding.l]); + } + _paddingElement.css(paddingElementCSS); + _targetElement.css(textareaCSS); + } + + //viewport size is padding container because it never has padding, margin and a border. + _viewportSize = getViewportSize(); + + //update Textarea + var textareaSize = _isTextarea ? textareaUpdate() : false; + + //fix height auto / width auto in cooperation with current padding & boxSizing behavior: + if (heightAuto && (heightAutoChanged || paddingAbsoluteChanged || boxSizingChanged || cssMaxValue.c || padding.c || border.c)) { + if (cssMaxValue.cw) + contentElementCSS[_strMaxMinus + _strHeight] = + (cssMaxValue.ch ? (cssMaxValue.ih - padding.ay + (_isBorderBox ? -_borderY : _paddingY)) + : _strEmpty); + contentElementCSS[_strHeight] = _strAuto; + } + else if (heightAutoChanged || paddingAbsoluteChanged) { + contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty; + contentElementCSS[_strHeight] = _strHundredPercent; + } + if (widthAuto && (widthAutoChanged || paddingAbsoluteChanged || boxSizingChanged || cssMaxValue.c || padding.c || border.c || cssDirectionChanged)) { + if (cssMaxValue.cw) + contentElementCSS[_strMaxMinus + _strWidth] = + (cssMaxValue.cw ? (cssMaxValue.iw - padding.ax + (_isBorderBox ? -_borderX : _paddingX)) + + (_nativeScrollbarIsOverlaid.y /*&& _hasOverflowCache.y && widthAuto */ ? _overlayScrollbarDummySize.y : 0) + : _strEmpty); + contentElementCSS[_strWidth] = _strAuto; + contentGlueElementCSS[_strMaxMinus + _strWidth] = _strHundredPercent; //IE Fix + } + else if (widthAutoChanged || paddingAbsoluteChanged) { + contentElementCSS[_strMaxMinus + _strWidth] = _strEmpty; + contentElementCSS[_strWidth] = _strHundredPercent; + contentElementCSS[_strFloat] = _strEmpty; + contentGlueElementCSS[_strMaxMinus + _strWidth] = _strEmpty; //IE Fix + } + if (widthAuto) { + if (!cssMaxValue.cw) + contentElementCSS[_strMaxMinus + _strWidth] = _strEmpty; + contentGlueElementCSS[_strWidth] = _isTextarea && textareaDynWidth ? textareaSize.dw : _strAuto; + + contentElementCSS[_strWidth] = _strAuto; + contentElementCSS[_strFloat] = isRTLRight; + } + if (heightAuto) { + if (!cssMaxValue.ch) + contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty; + //fix dyn height collapse bug: (doesn't works for width!) + //contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto; + contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0][LEXICON.cH]; + } + if (sizeAutoCapable) + _contentGlueElement.css(contentGlueElementCSS); + _contentElement.css(contentElementCSS); + + //CHECKPOINT HERE ~ + contentElementCSS = {}; + contentGlueElementCSS = {}; + + //if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true + if (hostSizeChanged || contentSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged || force) { + var strOverflow = 'overflow'; + var strOverflowX = strOverflow + '-x'; + var strOverflowY = strOverflow + '-y'; + var strHidden = 'hidden'; + var strVisible = 'visible'; + //decide whether the content overflow must get hidden for correct overflow measuring, it MUST be always hidden if the height is auto + var hideOverflow4CorrectMeasuring = _restrictedMeasuring ? + (_nativeScrollbarIsOverlaid.x || _nativeScrollbarIsOverlaid.y) || //it must be hidden if native scrollbars are overlaid + (_viewportSize.w < _nativeScrollbarMinSize.y || _viewportSize.h < _nativeScrollbarMinSize.x) || //it must be hidden if host-element is too small + heightAuto || displayIsHiddenChanged //it must be hidden if height is auto or display was change + : heightAuto; //if there is not the restricted Measuring bug, it must be hidden if the height is auto + + //Reset the viewport (very important for natively overlaid scrollbars and zoom change + var viewportElementResetCSS = {}; + var resetXTmp = _hasOverflowCache.y && _hideOverflowCache.ys && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.y ? _viewportElement.css(isRTLLeft) : -_nativeScrollbarSize.y) : 0; + var resetBottomTmp = _hasOverflowCache.x && _hideOverflowCache.xs && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.x ? _viewportElement.css(_strBottom) : -_nativeScrollbarSize.x) : 0; + setTopRightBottomLeft(viewportElementResetCSS, _strEmpty); + _viewportElement.css(viewportElementResetCSS); + if(hideOverflow4CorrectMeasuring) + _contentElement.css(strOverflow, strHidden); + + //measure several sizes: + var contentMeasureElement = getContentMeasureElement(); + //in Firefox content element has to have overflow hidden, else element margins aren't calculated properly, this element prevents this bug, but only if scrollbars aren't overlaid + var contentMeasureElementGuaranty = _restrictedMeasuring && !hideOverflow4CorrectMeasuring ? _viewportElement[0] : contentMeasureElement; + var clientSize = { + w: contentMeasureElement[LEXICON.cW], + h: contentMeasureElement[LEXICON.cH] + }; + var scrollSize = { + w: Math.max(contentMeasureElement[LEXICON.sW], contentMeasureElementGuaranty[LEXICON.sW]), + h: Math.max(contentMeasureElement[LEXICON.sH], contentMeasureElementGuaranty[LEXICON.sH]) + }; + var contentClientSize = { + w: _isTextarea && textareaSize && !textareaDynWidth ? textareaSize.ow : widthAuto ? clientSize.w : scrollSize.w, + h: _isTextarea && textareaSize && !textareaDynHeight ? textareaSize.oh : heightAuto ? clientSize.h : scrollSize.h + }; + + //apply the correct viewport style and measure viewport size + viewportElementResetCSS[_strBottom] = wasHeightAuto ? _strEmpty : resetBottomTmp; + viewportElementResetCSS[isRTLLeft] = wasWidthAuto ? _strEmpty : resetXTmp; + _viewportElement.css(viewportElementResetCSS); + //viewport size is padding container because it never has padding, margin and a border. + _viewportSize = getViewportSize(); + + //measure and correct several sizes + //has to be clientSize because offsetSize respect borders. + var hostSize = getHostSize(); + var contentGlueSize = { + w: Math.max(contentClientSize.w + padding.ax, hostSize.w - _paddingX) - (textareaDynWidth ? (_isTextarea && widthAuto ? _marginX + (!_isBorderBox ? _paddingX + _borderX : 0) : 0) : 0), + h: Math.max(contentClientSize.h + padding.ay, hostSize.h - _paddingY) + }; + contentGlueSize.c = checkCacheDouble(contentGlueSize, _contentGlueSizeCache, force); + _contentGlueSizeCache = contentGlueSize; + + //apply correct contentGlue size + if (sizeAutoCapable) { + //size contentGlue correctly to make sure the element has correct size if the sizing switches to auto + if (contentGlueSize.c || (heightAuto || widthAuto)) { + contentGlueElementCSS[_strWidth] = contentGlueSize.w; + contentGlueElementCSS[_strHeight] = contentGlueSize.h; + } + + var maxWidth = contentGlueElementCSS[_strWidth] + (_isBorderBox ? _borderX : -_paddingX); + var maxHeight = contentGlueElementCSS[_strHeight] + (_isBorderBox ? _borderY : -_paddingX); + var textareaCoverCSS = {}; + + //make contentGlue size -1 if element is not auto sized, to make sure that a resize event happens when the element shrinks + if (!widthAuto || (!widthAuto && border.c)) + contentGlueElementCSS[_strWidth] = hostSize.w - (_isBorderBox ? 0 : _paddingX + _borderX) - 1 - _marginX; + if (!heightAuto || (!heightAuto && border.c)) + contentGlueElementCSS[_strHeight] = hostSize.h - (_isBorderBox ? 0 : _paddingY + _borderY) - 1 - _marginY; + + //if size is auto and host is same size as max size, make content glue size +1 to make sure size changes will be detected + if (cssMaxValue.cw && cssMaxValue.iw === maxWidth) + contentGlueElementCSS[_strWidth] = maxWidth + (_isBorderBox ? 0 : _paddingX) + 1; + if (cssMaxValue.ch && cssMaxValue.ih === maxHeight) + contentGlueElementCSS[_strHeight] = maxHeight + (_isBorderBox ? 0 : _paddingY) + 1; + + //if size is auto and host is smaller than size as min size, make content glue size -1 to make sure size changes will be detected (this is only needed if padding is 0) + if (widthAuto && (clientSize.w < _viewportSize.w || _isTextarea && !textareaAutoWrapping) && _paddingX === 0) { + if (_isTextarea) + textareaCoverCSS[_strWidth] = parseToZeroOrNumber(_textareaCoverElement.css(_strWidth)) - 1; + contentGlueElementCSS[_strWidth] -= 1; + } + if (heightAuto && (clientSize.h < _viewportSize.h || _isTextarea) && _paddingY === 0) { + if (_isTextarea) + textareaCoverCSS[_strHeight] = parseToZeroOrNumber(_textareaCoverElement.css(_strHeight)) - 1; + contentGlueElementCSS[_strHeight] -= 1; + } + + //make sure content glue size at least 1 + if (contentClientSize.h > 0) { + contentGlueElementCSS[_strWidth] = Math.max(1, contentGlueElementCSS[_strWidth]); + contentGlueElementCSS[_strHeight] = Math.max(1, contentGlueElementCSS[_strHeight]); + } + + if (_isTextarea) + _textareaCoverElement.css(textareaCoverCSS); + _contentGlueElement.css(contentGlueElementCSS); + } + if (widthAuto) + contentElementCSS[_strWidth] = _strHundredPercent; + if (widthAuto && !_isBorderBox && !_mutationObserverConnected) + contentElementCSS[_strFloat] = 'none'; + + + //apply and reset content style + _contentElement.css(contentElementCSS); + contentElementCSS = {}; + + //measure again, but this time all correct sizes: + var contentBCRect = contentMeasureElement.getBoundingClientRect(); + var contentBCRectW = contentBCRect[_strWidth] || 0; + var contentBCRectH = contentBCRect[_strHeight] || 0; + var contentScrollSize = { + w: Math.max(contentMeasureElement[LEXICON.sW], contentMeasureElementGuaranty[LEXICON.sW]) + parseToZeroOrNumber(contentBCRectW) - contentBCRectW, + h: Math.max(contentMeasureElement[LEXICON.sH], contentMeasureElementGuaranty[LEXICON.sH]) + parseToZeroOrNumber(contentBCRectH) - contentBCRectH + }; + contentScrollSize.c = contentSizeChanged = checkCacheDouble(contentScrollSize, _contentScrollSizeCache, force); + _contentScrollSizeCache = contentScrollSize; + + if(hideOverflow4CorrectMeasuring) + _contentElement.css(strOverflow, _strEmpty); + + //refresh viewport size after correct measuring + _viewportSize = getViewportSize(); + + //has to be clientSize because offsetSize respect borders. + hostSize = getHostSize(); + hostSizeChanged = checkCacheDouble(hostSize, _hostSizeCache); + _hostSizeCache = hostSize; + + var overflowBehaviorIsVS = { + x: overflowBehavior.x === 'v-s', + y: overflowBehavior.y === 'v-s' + }; + var overflowBehaviorIsVH = { + x: overflowBehavior.x === 'v-h', + y: overflowBehavior.y === 'v-h' + }; + var overflowBehaviorIsS = { + x: overflowBehavior.x === 's', + y: overflowBehavior.y === 's' + }; + var overflowAmount = { + x: Math.max(0, Math.round((contentScrollSize.w - _viewportSize.w) * 100) / 100), + y: Math.max(0, Math.round((contentScrollSize.h - _viewportSize.h) * 100) / 100) + }; + var hideOverflowForceTextarea = _isTextarea && (_viewportSize.w === 0 || _viewportSize.h === 0); + var hideOverflowForceRounding = (_viewportElement[0].scrollLeftMax === 0 && overflowAmount.x > 0 && overflowAmount.x < 1) || (_viewportElement[0].scrollTopMax === 0 && overflowAmount.y > 0 && overflowAmount.y < 1); + if (hideOverflowForceTextarea || hideOverflowForceRounding) + overflowAmount.x = overflowAmount.y = 0; + var hasOverflow = { + x: overflowAmount.x > 0, + y: overflowAmount.y > 0 + }; + //hideOverflow: + //x || y : true === overflow is hidden by "overflow: scroll" OR "overflow: hidden" + //xs || ys : true === overflow is hidden by "overflow: scroll" + var hideOverflow = {x: hasOverflow.x, y: hasOverflow.y}; + if (overflowBehaviorIsVS.x || overflowBehaviorIsVH.x) + hideOverflow.x = (hasOverflow.y && !overflowBehaviorIsVS.y && !overflowBehaviorIsVH.y); + if (overflowBehaviorIsVS.y || overflowBehaviorIsVH.y) + hideOverflow.y = (hasOverflow.x && !overflowBehaviorIsVS.x && !overflowBehaviorIsVH.x); + hideOverflow.xs = hideOverflow.x ? (overflowBehaviorIsS.x || overflowBehaviorIsVS.x) : false; + hideOverflow.ys = hideOverflow.y ? (overflowBehaviorIsS.y || overflowBehaviorIsVS.y) : false; + + var canScroll = { + x: hasOverflow.x && hideOverflow.xs, + y: hasOverflow.y && hideOverflow.ys + }; + var previousOverflow = _overflowAmountCache; + overflowAmount.c = checkCacheDouble(overflowAmount, _overflowAmountCache, _strX, _strY, force); + _overflowAmountCache = overflowAmount; + hasOverflow.c = checkCacheDouble(hasOverflow, _hasOverflowCache, _strX, _strY, force); + _hasOverflowCache = hasOverflow; + hideOverflow.c = checkCacheDouble(hideOverflow, _hideOverflowCache, _strX, _strY, force); + _hideOverflowCache = hideOverflow; + + //if native scrollbar is overlay at x OR y axis, prepare DOM + if (_nativeScrollbarIsOverlaid.x || _nativeScrollbarIsOverlaid.y) { + var borderDesign = 'px solid transparent'; + var contentArrangeElementCSS = { }; + var arrangeContent = { }; + var arrangeChanged = force; + if (hasOverflow.x || hasOverflow.y) { + arrangeContent.w = _nativeScrollbarIsOverlaid.y && hasOverflow.y ? contentScrollSize.w + _overlayScrollbarDummySize.y : _strEmpty; + arrangeContent.h = _nativeScrollbarIsOverlaid.x && hasOverflow.x ? contentScrollSize.h + _overlayScrollbarDummySize.x : _strEmpty; + arrangeChanged = checkCacheSingle(arrangeContent, _arrangeContentSizeCache, force); + _arrangeContentSizeCache = arrangeContent; + } + + if (hasOverflow.c || hideOverflow.c || contentScrollSize.c || cssDirectionChanged || widthAutoChanged || heightAutoChanged || widthAuto || heightAuto || ignoreOverlayScrollbarHidingChanged) { + contentElementCSS[_strMarginMinus + isRTLRight] = contentElementCSS[_strBorderMinus + isRTLRight] = _strEmpty; + if (_nativeScrollbarIsOverlaid.x && hasOverflow.x && hideOverflow.xs) { + contentElementCSS[_strMarginMinus + _strBottom] = heightAuto ? (ignoreOverlayScrollbarHiding ? _strEmpty : _overlayScrollbarDummySize.x) : _strEmpty; + contentElementCSS[_strBorderMinus + _strBottom] = (!heightAuto && !ignoreOverlayScrollbarHiding) ? (_overlayScrollbarDummySize.x + borderDesign) : _strEmpty; + } + else { + arrangeContent.h = + contentElementCSS[_strMarginMinus + _strBottom] = + contentElementCSS[_strBorderMinus + _strBottom] = _strEmpty; + arrangeChanged = true; + } + if (_nativeScrollbarIsOverlaid.y && hasOverflow.y && hideOverflow.ys) { + contentElementCSS[_strMarginMinus + isRTLLeft] = widthAuto ? (ignoreOverlayScrollbarHiding ? _strEmpty : _overlayScrollbarDummySize.y) : _strEmpty; + contentElementCSS[_strBorderMinus + isRTLLeft] = (/* !widthAuto && */ !ignoreOverlayScrollbarHiding) ? (_overlayScrollbarDummySize.y + borderDesign) : _strEmpty; + } + else { + arrangeContent.w = + contentElementCSS[_strMarginMinus + isRTLLeft] = + contentElementCSS[_strBorderMinus + isRTLLeft] = _strEmpty; + arrangeChanged = true; + } + } + if (ignoreOverlayScrollbarHiding) { + arrangeContent.w = arrangeContent.h = _strEmpty; + arrangeChanged = true; + } + if (arrangeChanged) { + contentArrangeElementCSS[_strWidth] = hideOverflow.y ? arrangeContent.w : _strEmpty; + contentArrangeElementCSS[_strHeight] = hideOverflow.x ? arrangeContent.h : _strEmpty; + + if (!_contentArrangeElement) { + _contentArrangeElement = FRAMEWORK(generateDiv(_classNameContentArrangeElement)); + _viewportElement.prepend(_contentArrangeElement); + } + _contentArrangeElement.css(contentArrangeElementCSS); + } + _contentElement.css(contentElementCSS); + } + + var viewportElementCSS = {}; + var paddingElementCSS = {}; + if (hostSizeChanged || hasOverflow.c || hideOverflow.c || contentScrollSize.c || overflowBehaviorChanged || boxSizingChanged || ignoreOverlayScrollbarHidingChanged || cssDirectionChanged || clipAlwaysChanged || heightAutoChanged) { + viewportElementCSS[isRTLRight] = _strEmpty; + var resetScrollbarHidingX = function () { + viewportElementCSS[_strBottom] = _strEmpty; + _contentBorderSize.h = 0; + }; + var resetScrollbarHidingY = function () { + viewportElementCSS[isRTLLeft] = _strEmpty; + _contentBorderSize.w = 0; + }; + if (hasOverflow.x && hideOverflow.xs) { + viewportElementCSS[strOverflowX] = _strScroll; + if (!ignoreOverlayScrollbarHiding) { + viewportElementCSS[_strBottom] = -(_nativeScrollbarIsOverlaid.x ? _overlayScrollbarDummySize.x : _nativeScrollbarSize.x); + _contentBorderSize.h = _nativeScrollbarIsOverlaid.x ? _overlayScrollbarDummySize.y : 0; + } + else + resetScrollbarHidingX(); + } else { + viewportElementCSS[strOverflowX] = _strEmpty; + resetScrollbarHidingX(); + } + if (hasOverflow.y && hideOverflow.ys) { + viewportElementCSS[strOverflowY] = _strScroll; + if (!ignoreOverlayScrollbarHiding) { + viewportElementCSS[isRTLLeft] = -(_nativeScrollbarIsOverlaid.y ? _overlayScrollbarDummySize.y : _nativeScrollbarSize.y); + _contentBorderSize.w = _nativeScrollbarIsOverlaid.y ? _overlayScrollbarDummySize.x : 0; + } + else + resetScrollbarHidingY(); + } else { + viewportElementCSS[strOverflowY] = _strEmpty; + resetScrollbarHidingY(); + } + + // if the scroll container is too small and if there is any overflow with not overlay scrollbar, make viewport element greater in size (Firefox hide Scrollbars fix) + // because firefox starts hiding scrollbars on too small elements + // with this behavior the overflow calculation may be incorrect or the scrollbars would appear suddenly + // https://bugzilla.mozilla.org/show_bug.cgi?id=292284 + if ((_viewportSize.h < _nativeScrollbarMinSize.x || _viewportSize.w < _nativeScrollbarMinSize.y) + && ((hasOverflow.x && hideOverflow.x && !_nativeScrollbarIsOverlaid.x) || (hasOverflow.y && hideOverflow.y && !_nativeScrollbarIsOverlaid.y))) { + viewportElementCSS[_strPaddingMinus + _strTop] = _nativeScrollbarMinSize.x; + viewportElementCSS[_strMarginMinus + _strTop] = -_nativeScrollbarMinSize.x; + + viewportElementCSS[_strPaddingMinus + isRTLRight] = _nativeScrollbarMinSize.y; + viewportElementCSS[_strMarginMinus + isRTLRight] = -_nativeScrollbarMinSize.y; + } + else { + viewportElementCSS[_strPaddingMinus + _strTop] = + viewportElementCSS[_strMarginMinus + _strTop] = + viewportElementCSS[_strPaddingMinus + isRTLRight] = + viewportElementCSS[_strMarginMinus + isRTLRight] = _strEmpty; + } + viewportElementCSS[_strPaddingMinus + isRTLLeft] = + viewportElementCSS[_strMarginMinus + isRTLLeft] = _strEmpty; + + //if there is any overflow (x OR y axis) and this overflow shall be hidden, make overflow hidden, else overflow visible + if ((hasOverflow.x && hideOverflow.x) || (hasOverflow.y && hideOverflow.y) || hideOverflowForceTextarea) { + //only hide if is Textarea + if (_isTextarea && hideOverflowForceTextarea) { + paddingElementCSS[strOverflowX] = + paddingElementCSS[strOverflowY] = strHidden; + } + } + else { + if (!clipAlways || (overflowBehaviorIsVH.x || overflowBehaviorIsVS.x || overflowBehaviorIsVH.y || overflowBehaviorIsVS.y)) { + //only un-hide if Textarea + if (_isTextarea) { + paddingElementCSS[strOverflowX] = + paddingElementCSS[strOverflowY] = _strEmpty; + } + viewportElementCSS[strOverflowX] = + viewportElementCSS[strOverflowY] = strVisible; + } + } + + _paddingElement.css(paddingElementCSS); + _viewportElement.css(viewportElementCSS); + viewportElementCSS = { }; + + //force soft redraw in webkit because without the scrollbars will may appear because DOM wont be redrawn under special conditions + if ((hasOverflow.c || boxSizingChanged || widthAutoChanged || heightAutoChanged) && !(_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)) { + var element = _contentElement[0]; + var elementStyle = element[LEXICON.s]; + var dump; + elementStyle.webkitTransform = 'scale(1)'; + elementStyle.display = 'run-in'; + dump = element[LEXICON.oH]; + elementStyle.display = _strEmpty; //|| dump; //use dump to prevent it from deletion if minify + elementStyle.webkitTransform = _strEmpty; + } + //force hard redraw in webkit if native overlaid scrollbars shall appear + if (ignoreOverlayScrollbarHidingChanged && ignoreOverlayScrollbarHiding) { + //_hostElement.hide(); + //var dump = hostElement[LEXICON.oH]; + //_hostElement.show(); + } + } + + //change to direction RTL and width auto Bugfix in Webkit + //without this fix, the DOM still thinks the scrollbar is LTR and thus the content is shifted to the left + contentElementCSS = {}; + if (cssDirectionChanged || widthAutoChanged || heightAutoChanged) { + if (_isRTL && widthAuto) { + var floatTmp = _contentElement.css(_strFloat); + var posLeftWithoutFloat = Math.round(_contentElement.css(_strFloat, _strEmpty).css(_strLeft, _strEmpty).position().left); + _contentElement.css(_strFloat, floatTmp); + var posLeftWithFloat = Math.round(_contentElement.position().left); + + if (posLeftWithoutFloat !== posLeftWithFloat) + contentElementCSS[_strLeft] = posLeftWithoutFloat; + } + else { + contentElementCSS[_strLeft] = _strEmpty; + } + } + _contentElement.css(contentElementCSS); + + //scrollbars management: + var scrollbarsVisibilityVisible = scrollbarsVisibility === 'v'; + var scrollbarsVisibilityHidden = scrollbarsVisibility === 'h'; + var scrollbarsVisibilityAuto = scrollbarsVisibility === 'a'; + + var showScrollbarH = COMPATIBILITY.bind(refreshScrollbarAppearance, 0, true, true, canScroll.x); + var showScrollbarV = COMPATIBILITY.bind(refreshScrollbarAppearance, 0, false, true, canScroll.y); + var hideScrollbarH = COMPATIBILITY.bind(refreshScrollbarAppearance, 0, true, false, canScroll.x); + var hideScrollbarV = COMPATIBILITY.bind(refreshScrollbarAppearance, 0, false, false, canScroll.y); + + //manage class name which indicates scrollable overflow + if (hideOverflow.x || hideOverflow.y) + addClass(_hostElement, _classNameHostOverflow); + else + removeClass(_hostElement, _classNameHostOverflow); + if (hideOverflow.x) + addClass(_hostElement, _classNameHostOverflowX); + else + removeClass(_hostElement, _classNameHostOverflowX); + if (hideOverflow.y) + addClass(_hostElement, _classNameHostOverflowY); + else + removeClass(_hostElement, _classNameHostOverflowY); + + //add or remove rtl class name for styling purposes + if (cssDirectionChanged) { + if (_isRTL) + addClass(_hostElement, _classNameHostRTL); + else + removeClass(_hostElement, _classNameHostRTL); + } + + //manage the resize feature (CSS3 resize "polyfill" for this plugin) + if (_isBody) + addClass(_hostElement, _classNameHostResizeDisabled); + if (resizeChanged) { + var addCornerEvents = function () { _scrollbarCornerElement.on(_strMouseTouchDownEvent, scrollbarCornerOnMouseDown); }; + var removeCornerEvents = function () { _scrollbarCornerElement.off(_strMouseTouchDownEvent, scrollbarCornerOnMouseDown); }; + if (_resizeNone) { + addClass(_hostElement, _classNameHostResizeDisabled); + removeClass(_scrollbarCornerElement, [ + _classNameScrollbarCornerResize, + _classNameScrollbarCornerResizeB, + _classNameScrollbarCornerResizeH, + _classNameScrollbarCornerResizeV].join(_strSpace)); + removeCornerEvents(); + } + else { + removeClass(_hostElement, _classNameHostResizeDisabled); + addClass(_scrollbarCornerElement, _classNameScrollbarCornerResize); + if (_resizeBoth) + addClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeB); + else if (_resizeHorizontal) + addClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeH); + else if (_resizeVertical) + addClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeV); + + removeCornerEvents(); + addCornerEvents(); + } + } + + //manage the scrollbars general visibility + the scrollbar interactivity (unusable class name) + if (scrollbarsVisibilityChanged || overflowBehaviorChanged || hideOverflow.c || hasOverflow.c || ignoreOverlayScrollbarHidingChanged) { + if (ignoreOverlayScrollbarHiding) { + if (ignoreOverlayScrollbarHidingChanged) { + removeClass(_hostElement, _classNameHostScrolling); + if (ignoreOverlayScrollbarHiding) { + hideScrollbarH(); + hideScrollbarV(); + } + } + } + else if (scrollbarsVisibilityAuto) { + if (canScroll.x) + showScrollbarH(); + else + hideScrollbarH(); + + if (canScroll.y) + showScrollbarV(); + else + hideScrollbarV(); + } + else if (scrollbarsVisibilityVisible) { + showScrollbarH(); + showScrollbarV(); + } + else if (scrollbarsVisibilityHidden) { + hideScrollbarH(); + hideScrollbarV(); + } + } + + //manage the scrollbars auto hide feature (auto hide them after specific actions) + if (scrollbarsAutoHideChanged || ignoreOverlayScrollbarHidingChanged) { + var addMouseTouchEvents = function (move) { + if (_supportPassiveEvents) { + if(move) + addPassiveEventListener(_hostElement, _strMouseTouchMoveEvent, hostOnMouseMove); + else { + addPassiveEventListener(_hostElement, _strMouseTouchEnter, hostOnMouseEnter); + addPassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); + } + } + else { + if(move) + _hostElement.on(_strMouseTouchMoveEvent, hostOnMouseMove); + else { + _hostElement.on(_strMouseTouchEnter, hostOnMouseEnter) + .on(_strMouseTouchLeave, hostOnMouseLeave); + } + } + + //if the plugin is initialized and the mouse is over the host element, make the scrollbars visible + if(!_initialized) + _hostElement.one("mouseover", hostOnMouseEnter); + }; + var removeMouseTouchEvents = function () { + if (_supportPassiveEvents) { + removePassiveEventListener(_hostElement, _strMouseTouchMoveEvent, hostOnMouseMove); + removePassiveEventListener(_hostElement, _strMouseTouchEnter, hostOnMouseEnter); + removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); + } + else { + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); + } + }; + if (_scrollbarsAutoHideLeave || _scrollbarsAutoHideMove) { + removeMouseTouchEvents(); + addMouseTouchEvents(_scrollbarsAutoHideMove); + } + else { + removeMouseTouchEvents(); + } + + if (_scrollbarsAutoHideNever) + refreshScrollbarsAutoHide(true); + else + refreshScrollbarsAutoHide(false, true); + } + + //manage scrollbars handle length and offset + if (hostSizeChanged || overflowAmount.c || heightAutoChanged || widthAutoChanged || resizeChanged || boxSizingChanged || paddingAbsoluteChanged || ignoreOverlayScrollbarHidingChanged || cssDirectionChanged) { + refreshScrollbarHandleLength(true); + refreshScrollbarHandleOffset(true, currScroll.l); + refreshScrollbarHandleLength(false); + refreshScrollbarHandleOffset(false, currScroll.t); + } + + //manage interactivity + if (scrollbarsClickScrollingChanged) + refreshScrollbarsInteractive(true, scrollbarsClickScrolling); + if (scrollbarsDragScrollingChanged) + refreshScrollbarsInteractive(false, scrollbarsDragScrolling); + + //handle scroll + if (_isTextarea && contentSizeChanged) { + var textareaInfo = getTextareaInfo(); + if (textareaInfo) { + var textareaRowsChanged = _textareaInfoCache === undefined ? true : textareaInfo.rows !== _textareaInfoCache.rows; + var cursorRow = textareaInfo.cR; + var cursorCol = textareaInfo.cC; + var widestRow = textareaInfo.w; + var lastRow = textareaInfo.r; + var lastCol = textareaInfo.c; + var cursorPos = textareaInfo.p; + var cursorMax = textareaInfo.m; + var cursorIsLastPosition = (cursorMax === cursorPos && _textareaHasFocus); + var doScroll = { + x: (!textareaAutoWrapping && (cursorCol === lastCol && cursorRow === widestRow)) ? _overflowAmountCache.x : -1, + y: (textareaAutoWrapping ? cursorIsLastPosition || textareaRowsChanged && (previousOverflow !== undefined ? (currScroll.t === previousOverflow.y) : false) : (cursorIsLastPosition || textareaRowsChanged) && cursorRow === lastRow) ? _overflowAmountCache.y : -1 + }; + var doScrollX = doScroll.x > -1; + var doScrollY = doScroll.y > -1; + + if (doScrollX || doScrollY) { + if (doScrollY) + _viewportElement[_strScrollTop](doScroll.y); + if (doScrollX) { + if (_isRTL && _normalizeRTLCache && _rtlScrollBehavior.i) + _viewportElement[_strScrollLeft](0); //if inverted, scroll to 0 -> normalized this means to max scroll offset. + else + _viewportElement[_strScrollLeft](doScroll.x); + } + } + } + _textareaInfoCache = textareaInfo; + } + else if (!_isTextarea) { + if (_isRTL && _rtlScrollBehavior.i && _nativeScrollbarIsOverlaid.y && hasOverflow.x && _normalizeRTLCache) + currScroll.l += _contentBorderSize.w || 0; + _viewportElement[_strScrollLeft](currScroll.l); + _viewportElement[_strScrollTop](currScroll.t); + } + + if (cssDirectionChanged) { + callCallback("onDirectionChanged", { + isRTL: _isRTL, + dir: cssDirection + }); + } + if (hostSizeChanged) { + callCallback("onHostSizeChanged", { + width: _hostSizeCache.w, + height: _hostSizeCache.h + }); + } + if (contentSizeChanged) { + callCallback("onContentSizeChanged", { + width: _contentScrollSizeCache.w, + height: _contentScrollSizeCache.h + }); + } + if (hasOverflow.c || hideOverflow.c) { + callCallback("onOverflowChanged", { + x: hasOverflow.x, + y: hasOverflow.y, + xScrollable: hideOverflow.xs, + yScrollable: hideOverflow.ys, + clipped: hideOverflow.x || hideOverflow.y + }); + } + if (overflowAmount.c) { + callCallback("onOverflowAmountChanged", { + x: overflowAmount.x, + y: overflowAmount.y + }); + } + } + + //fix body min size + if (_isBody && (_hasOverflowCache.c || _bodyMinSizeCache.c)) { + //its possible that no min size was measured until now, because the content arrange element was just added now, in this case, measure now the min size. + if (!_bodyMinSizeCache.f) + bodyMinSizeChanged(); + if (_nativeScrollbarIsOverlaid.y && _hasOverflowCache.x) + _contentElement.css(_strMinMinus + _strWidth, _bodyMinSizeCache.w + _overlayScrollbarDummySize.y); + if (_nativeScrollbarIsOverlaid.x && _hasOverflowCache.y) + _contentElement.css(_strMinMinus + _strHeight, _bodyMinSizeCache.h + _overlayScrollbarDummySize.x); + _bodyMinSizeCache.c = false; + } + + unfreezeResizeObserver(_sizeObserverElement); + unfreezeResizeObserver(_sizeAutoObserverElement); + + callCallback("onUpdated", { forced: force }); + } + + + //==== Options ====// + + /** + * Sets new options but doesn't call the update method. + * @param newOptions The object which contains the new options. + */ + function setOptions(newOptions) { + _currentOptions = extend(true, {}, _currentOptions, _pluginsOptions.v(newOptions, _pluginsOptions.t, true)); + _currentPreparedOptions = extend(true, {}, _currentPreparedOptions, _pluginsOptions.v(newOptions, _pluginsOptions.t, false, true)); + } + + + //==== Scrollbars ====// + + /** + * Builds all scrollbars if they aren't already build. + */ + function buildScrollbars() { + _scrollbarHorizontalElement = FRAMEWORK(generateDiv(_classNameScrollbar + _strSpace + _classNameScrollbarHorizontal)); + _scrollbarHorizontalTrackElement = FRAMEWORK(generateDiv(_classNameScrollbarTrack)); + _scrollbarHorizontalHandleElement = FRAMEWORK(generateDiv(_classNameScrollbarHandle)); + _scrollbarVerticalElement = FRAMEWORK(generateDiv(_classNameScrollbar + _strSpace + _classNameScrollbarVertical)); + _scrollbarVerticalTrackElement = FRAMEWORK(generateDiv(_classNameScrollbarTrack)); + _scrollbarVerticalHandleElement = FRAMEWORK(generateDiv(_classNameScrollbarHandle)); + + _scrollbarHorizontalElement.append(_scrollbarHorizontalTrackElement); + _scrollbarHorizontalTrackElement.append(_scrollbarHorizontalHandleElement); + _scrollbarVerticalElement.append(_scrollbarVerticalTrackElement); + _scrollbarVerticalTrackElement.append(_scrollbarVerticalHandleElement); + + _paddingElement.after(_scrollbarVerticalElement); + _paddingElement.after(_scrollbarHorizontalElement); + + //scrollbar events + if (_supportTransition) { + _scrollbarHorizontalElement.on(_strTransitionEndEvent, function (event) { + if (event.target !== _scrollbarHorizontalElement[0]) + return; + refreshScrollbarHandleLength(true); + refreshScrollbarHandleOffset(true, _viewportElement[_strScrollLeft]()); + }); + _scrollbarVerticalElement.on(_strTransitionEndEvent, function (event) { + if (event.target !== _scrollbarVerticalElement[0]) + return; + refreshScrollbarHandleLength(false); + refreshScrollbarHandleOffset(false, _viewportElement[_strScrollTop]()); + }); + } + initScrollbarInteractivity(true); + initScrollbarInteractivity(false); + _scrollbarCornerElement = FRAMEWORK(generateDiv(_classNameScrollbarCorner)); + _hostElement.append(_scrollbarCornerElement); + } + + /** + * Initializes all scrollbar interactivity. (track and handle dragging, clicking, scrolling) + * @param isHorizontal True if the target scrollbar is the horizontal scrollbar, false if the target scrollbar is the vertical scrollbar. + */ + function initScrollbarInteractivity(isHorizontal) { + var scrollbarVars = getScrollbarVars(isHorizontal); + var insideIFrame = _windowElement.top !== _windowElement; + var mouseDownScroll; + var mouseDownOffset; + var xy = scrollbarVars.xy; + var XY = scrollbarVars.XY; + var scroll = _strScroll + scrollbarVars.LT; + var strActive = 'active'; + var trackTimeout; + var scrollDurationFactor = 1; + var increaseDecreaseScrollAmountKeyCodes = [ 16, 17 ]; //shift, ctrl + function increaseTrackScrollAmount() { + scrollDurationFactor = 0.5; + }; + function decreaseTrackScrollAmount() { + scrollDurationFactor = 1; + }; + function documentKeyDown(event) { + if (FRAMEWORK.inArray(event.keyCode, increaseDecreaseScrollAmountKeyCodes) > -1) + increaseTrackScrollAmount(); + }; + function documentKeyUp(event) { + if (FRAMEWORK.inArray(event.keyCode, increaseDecreaseScrollAmountKeyCodes) > -1) + decreaseTrackScrollAmount(); + }; + function onMouseTouchDownContinue(event) { + var originalEvent = event.originalEvent || event; + var isTouchEvent = originalEvent.touches !== undefined; + return _isSleeping || nativeOverlayScrollbarsAreActive() || !_scrollbarsDragScrollingCache || (isTouchEvent && !_scrollbarsTouchSupport) ? false : COMPATIBILITY.mBtn(event) === 1 || isTouchEvent; + }; + function handleDragMove(event) { + if(!onMouseTouchDownContinue(event)) { + documentMouseTouchUp(event); + return; + } + + var trackLength = scrollbarVars.i.tl; + var handleLength = scrollbarVars.i.hl; + var scrollRange = scrollbarVars.i.ms; + var scrollRaw = (_msieVersion && insideIFrame ? event['screen' + XY] : COMPATIBILITY.page(event)[xy]) - mouseDownOffset; //use screen coordinates in EDGE & IE because the page values are incorrect in frames. + var scrollDeltaPercent = scrollRaw / (trackLength - handleLength); + var scrollDelta = (scrollRange * scrollDeltaPercent); + scrollDelta = isFinite(scrollDelta) ? scrollDelta : 0; + if (_isRTL && isHorizontal && !_rtlScrollBehavior.i) + scrollDelta *= -1; + _viewportElement[scroll](mouseDownScroll + scrollDelta); + + if (!_supportPassiveEvents) + COMPATIBILITY.prvD(event); + }; + function documentMouseTouchUp(event) { + event = event || event.originalEvent; + + removeClass(_bodyElement, _classNameDragging); + removeClass(scrollbarVars.h, strActive); + removeClass(scrollbarVars.t, strActive); + removeClass(scrollbarVars.s, strActive); + + _documentElement.off(_strMouseTouchMoveEvent, handleDragMove) + .off(_strMouseTouchUpEvent, documentMouseTouchUp) + .off(_strKeyDownEvent, documentKeyDown) + .off(_strKeyUpEvent, documentKeyUp) + .off(_strSelectStartEvent, documentOnSelectStart); + + decreaseTrackScrollAmount(); + mouseDownScroll = undefined; + mouseDownOffset = undefined; + if (trackTimeout !== undefined) { + _base.scrollStop(); + clearTimeout(trackTimeout); + trackTimeout = undefined; + } + + var rect = _hostElement[0].getBoundingClientRect(); + var mouseInsideHost = event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom; + + //if mouse is outside host element + if (!mouseInsideHost) + hostOnMouseLeave(); + + if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) + refreshScrollbarsAutoHide(false); + }; + function onHandleMouseTouchDown(event) { + mouseDownScroll = _viewportElement[scroll](); + mouseDownScroll = mouseDownScroll === undefined ? 0 : mouseDownScroll; + if (_isRTL && isHorizontal && !_rtlScrollBehavior.n || !_isRTL) + mouseDownScroll = mouseDownScroll < 0 ? 0 : mouseDownScroll; + mouseDownOffset = _msieVersion && insideIFrame ? event['screen' + XY] : COMPATIBILITY.page(event)[xy]; //use screen coordinates in EDGE & IE because the page values are incorrect in frames. + + addClass(_bodyElement, _classNameDragging); + addClass(scrollbarVars.h, strActive); + addClass(scrollbarVars.s, strActive); + + _documentElement.on(_strMouseTouchMoveEvent, handleDragMove) + .on(_strMouseTouchUpEvent, documentMouseTouchUp) + .on(_strSelectStartEvent, documentOnSelectStart); + + if(_msieVersion || !_documentMixed) + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + }; + scrollbarVars.h.on(_strMouseTouchDownEvent, function(event) { + if (onMouseTouchDownContinue(event)) + onHandleMouseTouchDown(event); + }); + scrollbarVars.t.on(_strMouseTouchDownEvent, function(event) { + if (onMouseTouchDownContinue(event)) { + var scrollDistance = _viewportSize[scrollbarVars._wh]; + var trackOffset = scrollbarVars.t.offset()[scrollbarVars.lt]; + var ctrlKey = event.ctrlKey; + var instantScroll = event.shiftKey; + var instantScrollTransition = instantScroll && ctrlKey; + var isFirstIteration = true; + var easing = 'linear'; + var decreaseScroll; + var finishedCondition; + var scrollAction = function () { + if(!_destroyed) { + var mouseOffset = mouseDownOffset - trackOffset; + var trackLength = scrollbarVars.i.tl; + var handleOffset = scrollbarVars.i.ho; + var handleLength = scrollbarVars.i.hl; + var scrollRange = scrollbarVars.i.ms; + var scrollDuration = 270 * scrollDurationFactor; + var timeoutDelay = isFirstIteration ? Math.max(400, scrollDuration) : scrollDuration; + var instantScrollPosition = scrollRange * ((mouseOffset - (handleLength / 2)) / (trackLength - handleLength)); // 100% * positionPercent + var rtlIsNormal = _isRTL && isHorizontal && ((!_rtlScrollBehavior.i && !_rtlScrollBehavior.n) || _normalizeRTLCache); + var decreaseScrollCondition = rtlIsNormal ? handleOffset < mouseOffset : handleOffset > mouseOffset; + var scrollObj = { }; + + if(instantScroll) { + instantScrollPosition = isFinite(instantScrollPosition) ? instantScrollPosition : 0; + if (_isRTL && isHorizontal && !_rtlScrollBehavior.i) + instantScrollPosition = (scrollRange - instantScrollPosition); + if(instantScrollTransition) { + scrollObj.n = false; + scrollObj[xy] = instantScrollPosition; + _base.scroll(scrollObj, 130, easing, function() { onHandleMouseTouchDown(event); }); + } + else { + _viewportElement[scroll](instantScrollPosition); + onHandleMouseTouchDown(event); + } + } + else { + decreaseScroll = isFirstIteration ? decreaseScrollCondition : decreaseScroll; + finishedCondition = rtlIsNormal ? decreaseScroll ? handleOffset + handleLength >= mouseOffset : handleOffset <= mouseOffset : decreaseScroll ? handleOffset <= mouseOffset : handleOffset + handleLength >= mouseOffset; + + scrollObj[xy] = decreaseScroll ? '-=' + scrollDistance : '+=' + scrollDistance; + _base.scrollStop(); + _base.scroll(scrollObj, scrollDuration, easing); + + if (finishedCondition) { + clearTimeout(trackTimeout); + _base.scrollStop(); + trackTimeout = undefined; + } + else + trackTimeout = setTimeout(scrollAction, timeoutDelay); + isFirstIteration = false; + } + } + }; + if (ctrlKey) + increaseTrackScrollAmount(); + mouseDownOffset = COMPATIBILITY.page(event)[xy]; + + addClass(_bodyElement, _classNameDragging); + addClass(scrollbarVars.t, strActive); + addClass(scrollbarVars.s, strActive); + + _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp) + .on(_strKeyDownEvent, documentKeyDown) + .on(_strKeyUpEvent, documentKeyUp) + .on(_strSelectStartEvent, documentOnSelectStart); + + scrollAction(); + COMPATIBILITY.prvD(event); + COMPATIBILITY.stpP(event); + } + }).on(_strMouseTouchEnter, function() { //make sure both scrollbars will stay visible if one scrollbar is hovered if autoHide is "scroll". + if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) { + _scrollbarsAutoHideFlagScrollAndHovered = true; + refreshScrollbarsAutoHide(true); + } + }).on(_strMouseTouchLeave, function() { + if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) { + _scrollbarsAutoHideFlagScrollAndHovered = false; + refreshScrollbarsAutoHide(false); + } + }); + scrollbarVars.s.on(_strMouseTouchDownEvent, function(event) { + COMPATIBILITY.stpP(event); + }); + } + + /** + * Shows or hides the given scrollbar and applied a class name which indicates if the scrollbar is scrollable or not. + * @param isHorizontal True if the horizontal scrollbar is the target, false if the vertical scrollbar is the target. + * @param shallBeVisible True if the scrollbar shall be shown, false if hidden. + * @param canScroll True if the scrollbar is scrollable, false otherwise. + */ + function refreshScrollbarAppearance(isHorizontal, shallBeVisible, canScroll) { + var scrollbarClassName = isHorizontal ? _classNameHostScrollbarHorizontalHidden : _classNameHostScrollbarVerticalHidden; + var scrollbarElement = isHorizontal ? _scrollbarHorizontalElement : _scrollbarVerticalElement; + + if (shallBeVisible) + removeClass(_hostElement, scrollbarClassName); + else + addClass(_hostElement, scrollbarClassName); + + if (canScroll) + removeClass(scrollbarElement, _classNameScrollbarUnusable); + else + addClass(scrollbarElement, _classNameScrollbarUnusable); + } + + /** + * Autoshows / autohides both scrollbars with. + * @param shallBeVisible True if the scrollbars shall be autoshown (only the case if they are hidden by a autohide), false if the shall be auto hidden. + * @param delayfree True if the scrollbars shall be hidden without a delay, false or undefined otherwise. + */ + function refreshScrollbarsAutoHide(shallBeVisible, delayfree) { + clearTimeout(_scrollbarsAutoHideTimeoutId); + if (shallBeVisible) { + //if(_hasOverflowCache.x && _hideOverflowCache.xs) + removeClass(_scrollbarHorizontalElement, _classNameScrollbarAutoHidden); + //if(_hasOverflowCache.y && _hideOverflowCache.ys) + removeClass(_scrollbarVerticalElement, _classNameScrollbarAutoHidden); + } + else { + var strActive = 'active'; + var hide = function () { + if (!_scrollbarsAutoHideFlagScrollAndHovered && !_destroyed) { + var anyActive = _scrollbarHorizontalHandleElement.hasClass(strActive) || _scrollbarVerticalHandleElement.hasClass(strActive); + if (!anyActive && (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove || _scrollbarsAutoHideLeave)) + addClass(_scrollbarHorizontalElement, _classNameScrollbarAutoHidden); + if (!anyActive && (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove || _scrollbarsAutoHideLeave)) + addClass(_scrollbarVerticalElement, _classNameScrollbarAutoHidden); + } + }; + if (_scrollbarsAutoHideDelay > 0 && delayfree !== true) + _scrollbarsAutoHideTimeoutId = setTimeout(hide, _scrollbarsAutoHideDelay); + else + hide(); + } + } + + /** + * Refreshes the handle length of the given scrollbar. + * @param isHorizontal True if the horizontal scrollbar handle shall be refreshed, false if the vertical one shall be refreshed. + */ + function refreshScrollbarHandleLength(isHorizontal) { + var handleCSS = {}; + var scrollbarVars = getScrollbarVars(isHorizontal); + var digit = 1000000; + //get and apply intended handle length + var handleRatio = Math.min(1, (_hostSizeCache[scrollbarVars._wh] - (_paddingAbsoluteCache ? (isHorizontal ? _paddingX : _paddingY) : 0)) / _contentScrollSizeCache[scrollbarVars._wh]); + handleCSS[scrollbarVars.wh] = (Math.floor(handleRatio * 100 * digit) / digit) + "%"; //the last * digit / digit is for flooring to the 4th digit + + if (!nativeOverlayScrollbarsAreActive()) + scrollbarVars.h.css(handleCSS); + + //measure the handle length to respect min & max length + scrollbarVars.i.hl = scrollbarVars.h[0]['offset' + scrollbarVars.WH]; //hl = handle length + scrollbarVars.i.hlr = handleRatio; //hr = handle length ratio + } + + /** + * Refreshes the handle offset of the given scrollbar. + * @param isHorizontal True if the horizontal scrollbar handle shall be refreshed, false if the vertical one shall be refreshed. + * @param currentScroll The current scroll offset of the given scrollbar axis. (if isHorizontal ? scrollLeft : scrollTop) + */ + function refreshScrollbarHandleOffset(isHorizontal, currentScroll) { + var isRTLisHorizontal = _isRTL && isHorizontal; + var handleCSS = {}; + var scrollbarVars = getScrollbarVars(isHorizontal); + var strTranslateBrace = 'translate('; + var strTransform = 'transform'; + var translateValue; + + //measure the handle length to respect min & max length + //DONT use the variable '_contentScrollSizeCache[scrollbarVars._wh]' instead of '_viewportElement[0]['scroll' + scrollbarVars.WH]' + // because its a bit behind during the small delay when content size updates + //(delay = _mutationObserverContentLag, if its 0 then this var could be used) + var maxScroll = _viewportElement[0][_strScroll + scrollbarVars.WH] - _viewportElement[0]['client' + scrollbarVars.WH]; + var handleLength = scrollbarVars.i.hl; + var trackLength = scrollbarVars.t[0]['offset' + scrollbarVars.WH]; + var handleTrackDiff = trackLength - handleLength; + var offset = handleTrackDiff; + var transformOffset; + var posRatio; + + //if rtl scroll max is negative + if (_rtlScrollBehavior.n && isRTLisHorizontal) + maxScroll *= -1; + + posRatio = currentScroll / maxScroll; + posRatio = isNaN(posRatio) ? 0 : Math.min(1, posRatio); + + scrollbarVars.i.ms = maxScroll; //ms = max scroll + scrollbarVars.i.cs = currentScroll; //cs = current scroll + scrollbarVars.i.csr = posRatio; //csr = current scroll Ratio + + offset *= posRatio; + offset = isNaN(offset) ? 0 : offset; + if (isRTLisHorizontal && !_rtlScrollBehavior.i) + offset = trackLength - handleLength - offset; + offset = Math.max(0, offset); + + if (_supportTransform) { + transformOffset = isRTLisHorizontal ? -(trackLength - handleLength - offset) : offset; //in px + //transformOffset = (transformOffset / trackLength * 100) * (trackLength / handleLength); //in % + translateValue = isHorizontal ? strTranslateBrace + transformOffset + 'px, 0)' : strTranslateBrace + '0, ' + transformOffset + 'px)'; + handleCSS['-webkit-' + strTransform] = translateValue; + handleCSS['-moz-' + strTransform] = translateValue; + handleCSS['-ms-' + strTransform] = translateValue; + handleCSS['-o-' + strTransform] = translateValue; + handleCSS[strTransform] = translateValue; + } + else + handleCSS[scrollbarVars.lt] = offset; + + //only apply css if offset has changed and overflow exists. + if (!nativeOverlayScrollbarsAreActive()) + scrollbarVars.h.css(handleCSS); + + scrollbarVars.i.ho = offset; //ho = handle offset + scrollbarVars.i.tl = trackLength; //tl = track length + } + + /** + * Refreshes the interactivity of the given scrollbar element. + * @param isTrack True if the track element is the target, false if the handle element is the target. + * @param value True for interactivity false for no interactivity. + */ + function refreshScrollbarsInteractive(isTrack, value) { + var action = value ? 'removeClass' : 'addClass'; + var element1 = isTrack ? _scrollbarHorizontalTrackElement : _scrollbarHorizontalHandleElement; + var element2 = isTrack ? _scrollbarVerticalTrackElement : _scrollbarVerticalHandleElement; + var className = isTrack ? _classNameScrollbarTrackOff : _classNameScrollbarHandleOff; + + element1[action](className); + element2[action](className); + } + + /** + * Returns a object which is used for fast access for specific variables. + * @param isHorizontal True if the horizontal scrollbar vars shall be accessed, false if the vertical scrollbar vars shall be accessed. + * @returns {{wh: string, WH: string, lt: string, _wh: string, _lt: string, t: *, h: *, c: {}, s: *}} + */ + function getScrollbarVars(isHorizontal) { + return { + wh: isHorizontal ? _strWidth : _strHeight, + WH: isHorizontal ? 'Width' : 'Height', + lt: isHorizontal ? _strLeft : _strTop, + LT: isHorizontal ? 'Left' : 'Top', + xy: isHorizontal ? _strX : _strY, + XY: isHorizontal ? 'X' : 'Y', + _wh: isHorizontal ? 'w' : 'h', + _lt: isHorizontal ? 'l' : 't', + t: isHorizontal ? _scrollbarHorizontalTrackElement : _scrollbarVerticalTrackElement, + h: isHorizontal ? _scrollbarHorizontalHandleElement : _scrollbarVerticalHandleElement, + s: isHorizontal ? _scrollbarHorizontalElement : _scrollbarVerticalElement, + i: isHorizontal ? _scrollHorizontalInfo : _scrollVerticalInfo + }; + } + + + //==== Utils ====// + + /** + * Calls the callback with the given name. The Context of this callback is always _base (this). + * @param name The name of the target which shall be called. + * @param args The args with which the callback shall be called. + */ + function callCallback(name, args) { + if(_initialized) { + var callback = _currentPreparedOptions.callbacks[name]; + var extensionOnName = name; + var ext; + + if(extensionOnName.substr(0, 2) === "on") + extensionOnName = extensionOnName.substr(2, 1).toLowerCase() + extensionOnName.substr(3); + + if(type(callback) == TYPES.f) + callback.call(_base, args); + + FRAMEWORK.each(_extensions, function() { + ext = this; + if(type(ext.on) == TYPES.f) + ext.on(extensionOnName, args); + }); + } + } + + /** + * Sets the "top, right, bottom, left" properties, with a given prefix, of the given css object. + * @param targetCSSObject The css object to which the values shall be applied. + * @param prefix The prefix of the "top, right, bottom, left" css properties. (example: 'padding-' is a valid prefix) + * @param values A array of values which shall be applied to the "top, right, bottom, left" -properties. The array order is [top, right, bottom, left]. + * If this argument is undefined the value '' (empty string) will be applied to all properties. + */ + function setTopRightBottomLeft(targetCSSObject, prefix, values) { + if (values === undefined) + values = [_strEmpty, _strEmpty, _strEmpty, _strEmpty]; + + targetCSSObject[prefix + _strTop] = values[0]; + targetCSSObject[prefix + _strRight] = values[1]; + targetCSSObject[prefix + _strBottom] = values[2]; + targetCSSObject[prefix + _strLeft] = values[3]; + } + + /** + * Checks whether the given object is a HTMLElement. + * @param o The object which shall be checked. + * @returns {boolean} True the given object is a HTMLElement, false otherwise. + */ + function isHTMLElement(o) { + var strOwnerDocument = 'ownerDocument'; + var strHTMLElement = 'HTMLElement'; + var wnd = o && o[strOwnerDocument] ? (o[strOwnerDocument].parentWindow || window) : window; + return ( + typeof wnd[strHTMLElement] == TYPES.o ? o instanceof wnd[strHTMLElement] : //DOM2 + o && typeof o == TYPES.o && o !== null && o.nodeType === 1 && typeof o.nodeName == TYPES.s + ); + } + + /** + * Compares 2 arrays and returns the differences between them as a array. + * @param a1 The first array which shall be compared. + * @param a2 The second array which shall be compared. + * @returns {Array} The differences between the two arrays. + */ + function getArrayDifferences(a1, a2) { + var a = [ ]; + var diff = [ ]; + var i; + var k; + for (i = 0; i < a1.length; i++) + a[a1[i]] = true; + for (i = 0; i < a2.length; i++) { + if (a[a2[i]]) + delete a[a2[i]]; + else + a[a2[i]] = true; + } + for (k in a) + diff.push(k); + return diff; + } + + /** + * Returns Zero or the number to which the value can be parsed. + * @param value The value which shall be parsed. + * @param toFloat Indicates whether the number shall be parsed to a float. + */ + function parseToZeroOrNumber(value, toFloat) { + var num = toFloat ? window.parseFloat(value) : window.parseInt(value); + return isNaN(num) ? 0 : num; + } + + + /** + * Gets several information of the textarea and returns them as a object or undefined if the browser doesn't support it. + * @returns {{cursorRow: Number, cursorCol, rows: Number, cols: number, wRow: number, pos: number, max : number}} or undefined if not supported. + */ + function getTextareaInfo() { + //read needed values + var textareaCursorPosition = _targetElement[0].selectionStart; + if (textareaCursorPosition === undefined) + return; + + var strLength = 'length'; + var textareaValue = _targetElement.val(); + var textareaLength = textareaValue[strLength]; + var textareaRowSplit = textareaValue.split("\n"); + var textareaLastRow = textareaRowSplit[strLength]; + var textareaCurrentCursorRowSplit = textareaValue.substr(0, textareaCursorPosition).split("\n"); + var widestRow = 0; + var textareaLastCol = 0; + var cursorRow = textareaCurrentCursorRowSplit[strLength]; + var cursorCol = textareaCurrentCursorRowSplit[textareaCurrentCursorRowSplit[strLength] - 1][strLength]; + var rowCols; + var i; + + //get widest Row and the last column of the textarea + for (i = 0; i < textareaRowSplit[strLength]; i++) { + rowCols = textareaRowSplit[i][strLength]; + if (rowCols > textareaLastCol) { + widestRow = i + 1; + textareaLastCol = rowCols; + } + } + + return { + cR: cursorRow, //cursorRow + cC: cursorCol, //cursorCol + r: textareaLastRow, //rows + c: textareaLastCol, //cols + w: widestRow, //wRow + p: textareaCursorPosition, //pos + m: textareaLength //max + }; + } + + /** + * Checks the given key code and returns a boolean which is indicating if the given key code is a restricted one. + * @param keyCode The key code which shall be checked. + * @returns {boolean} True if the given key code is restricted, false otherwise. + */ + function textareaIsRestrictedKeyCode(keyCode) { + for (var i = 0; i < _textareaKeyDownRestrictedKeyCodes.length; i++) { + if (keyCode === _textareaKeyDownRestrictedKeyCodes[i]) + return true; + } + return false; + } + + /** + * Determines whether native overlay scrollbars are active. + * @returns {boolean} True if native overlay scrollbars are active, false otherwise. + */ + function nativeOverlayScrollbarsAreActive() { + return (_ignoreOverlayScrollbarHidingCache && (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)); + } + + /** + * Gets the element which is used to measure the content size. + * @returns {*} TextareaCover if target element is textarea else the ContentElement. + */ + function getContentMeasureElement() { + return _isTextarea ? _textareaCoverElement[0] : _contentElement[0]; + } + + /** + * Generates a string which represents a HTML div with the given classes or attributes. + * @param classesOrAttrs The class of the div as string or a object which represents the attributes of the div. (The class attribute can also be written as "className".) + * @param content The content of the div as string. + * @returns {string} The concated string which represents a HTML div and its content. + */ + function generateDiv(classesOrAttrs, content) { + return '
' + + (content ? content : _strEmpty) + + '
'; + } + + /** + * Gets the value of the given property from the given object. + * @param obj The object from which the property value shall be got. + * @param path The property of which the value shall be got. + * @returns {*} Returns the value of the searched property or undefined of the property wasn't found. + */ + function getObjectPropVal(obj, path) { + var splits = path.split(_strDot); + var i = 0; + var val; + for(; i < splits.length; i++) { + if(!obj.hasOwnProperty(splits[i])) + return; + val = obj[splits[i]]; + if(i < splits.length && type(val) == TYPES.o) + obj = val; + } + return val; + } + + /** + * Sets the value of the given property from the given object. + * @param obj The object from which the property value shall be set. + * @param path The property of which the value shall be set. + * @param val The value of the property which shall be set. + */ + function setObjectPropVal(obj, path, val) { + var splits = path.split(_strDot); + var splitsLength = splits.length; + var i = 0; + var extendObj = { }; + var extendObjRoot = extendObj; + for(; i < splitsLength; i++) + extendObj = extendObj[splits[i]] = i + 1 < splitsLength ? { } : val; + FRAMEWORK.extend(obj, extendObjRoot, true); + } + + //==== Utils Cache ====// + + /** + * Compares two values and returns the result of the comparison as a boolean. + * @param current The first value which shall be compared. + * @param cache The second value which shall be compared. + * @param force If true the returned value is always true. + * @returns {boolean} True if both variables aren't equal or some of them is undefined or when the force parameter is true, false otherwise. + */ + function checkCacheSingle(current, cache, force) { + if (force === true) + return force; + if (cache === undefined) + return true; + else if (current !== cache) + return true; + return false; + } + + /** + * Compares two objects with two properties and returns the result of the comparison as a boolean. + * @param current The first object which shall be compared. + * @param cache The second object which shall be compared. + * @param prop1 The name of the first property of the objects which shall be compared. + * @param prop2 The name of the second property of the objects which shall be compared. + * @param force If true the returned value is always true. + * @returns {boolean} True if both variables aren't equal or some of them is undefined or when the force parameter is true, false otherwise. + */ + function checkCacheDouble(current, cache, prop1, prop2, force) { + if (force === true) + return force; + if (prop2 === undefined && force === undefined) { + if (prop1 === true) + return prop1; + else + prop1 = undefined; + } + prop1 = prop1 === undefined ? 'w' : prop1; + prop2 = prop2 === undefined ? 'h' : prop2; + if (cache === undefined) + return true; + else if (current[prop1] !== cache[prop1] || current[prop2] !== cache[prop2]) + return true; + return false; + } + + /** + * Compares two objects which have four properties and returns the result of the comparison as a boolean. + * @param current The first object with four properties. + * @param cache The second object with four properties. + * @returns {boolean} True if both objects aren't equal or some of them is undefined, false otherwise. + */ + function checkCacheTRBL(current, cache) { + if (cache === undefined) + return true; + else if (current.t !== cache.t || + current.r !== cache.r || + current.b !== cache.b || + current.l !== cache.l) + return true; + return false; + } + + + //==== Shortcuts ====// + + /** + * jQuery type method shortcut. + */ + function type(obj) { + return COMPATIBILITY.type(obj); + } + + /** + * jQuery extend method shortcut. + */ + function extend() { + return FRAMEWORK.extend.apply(this, arguments); + } + + /** + * jQuery addClass method shortcut. + */ + function addClass(el, classes) { + return _frameworkProto.addClass.call(el, classes); + } + + /** + * jQuery removeClass method shortcut. + */ + function removeClass(el, classes) { + return _frameworkProto.removeClass.call(el, classes); + } + + /** + * jQuery remove method shortcut. + */ + function remove(el) { + return _frameworkProto.remove.call(el); + } + + /** + * Finds the first child element with the given selector of the given element. + * @param el The root element from which the selector shall be valid. + * @param selector The selector of the searched element. + * @returns {*} The first element which is a child of the given element and matches the givens selector. + */ + function findFirst(el, selector) { + return _frameworkProto.find.call(el, selector).eq(0); + } + + + //==== API ====// + + /** + * Puts the instance to sleep. It wont respond to any changes in the DOM and won't update. Scrollbar Interactivity is also disabled as well as the resize handle. + * This behavior can be reset by calling the update method. + */ + _base.sleep = function () { + _isSleeping = true; + }; + + /** + * Updates the plugin and DOM to the current options. + * This method should only be called if a update is 100% required. + * @param force True if every property shall be updated and the cache shall be ignored. + * !INTERNAL USAGE! : force can be a string "auto", "auto+" or "zoom" too + * if this is the case then before a real update the content size and host element attributes gets checked, and if they changed only then the update method will be called. + */ + _base.update = function (force) { + var attrsChanged; + var contentSizeC; + var isString = type(force) == TYPES.s; + var imgElementSelector = 'img'; + var imgElementLoadEvent = 'load'; + if(isString) { + if (force.indexOf(_strAuto) === 0) { + attrsChanged = meaningfulAttrsChanged(); + contentSizeC = updateAutoContentSizeChanged(); + if (attrsChanged || contentSizeC) + update(false, contentSizeC, false, force.slice(-1) == "+"); + } + else if (force === 'zoom') + update(true, true); + } + else { + force = _isSleeping || force; + _isSleeping = false; + update(false, false, force, true); + } + if(!_isTextarea) { + _contentElement.find(imgElementSelector).each(function(i, el) { + var index = COMPATIBILITY.inA(el, _imgs); + if (index === -1) + FRAMEWORK(el).off(imgElementLoadEvent, imgOnLoad).on(imgElementLoadEvent, imgOnLoad); + }); + } + }; + + /** + Gets or sets the current options. The update method will be called automatically if new options were set. + * @param newOptions If new options are given, then the new options will be set, if new options aren't given (undefined or a not a plain object) then the current options will be returned. + * @param value If new options is a property path string, then this value will be used to set the option to which the property path string leads. + * @returns {*} + */ + _base.options = function (newOptions, value) { + //return current options if newOptions are undefined or empty + if (FRAMEWORK.isEmptyObject(newOptions) || !FRAMEWORK.isPlainObject(newOptions)) { + if (type(newOptions) == TYPES.s) { + if (arguments.length >= 2) { + var option = { }; + setObjectPropVal(option, newOptions, value); + setOptions(option); + update(); + return; + } + else + return getObjectPropVal(_currentOptions, newOptions); + } + else + return _currentOptions; + } + setOptions(newOptions); + var isSleepingTmp = _isSleeping || false; + _isSleeping = false; + update(); + _isSleeping = isSleepingTmp; + }; + + /** + * Restore the DOM, disconnects all observers, remove all resize observers and destroy all methods. + */ + _base.destroy = function () { + _destroyed = true; + + autoUpdateLoop.remove(_base); + mutationObserversDisconnect(); + removeResizeObserver(_sizeObserverElement); + if (_sizeAutoObserverAdded) + removeResizeObserver(_sizeAutoObserverElement); + + for(var extName in _extensions) + _base.removeExt(extName); + + remove(_sizeObserverElement); + if (_contentGlueElement !== undefined) + remove(_contentGlueElement); + if (_contentArrangeElement !== undefined) + remove(_contentArrangeElement); + if (_sizeAutoObserverAdded) + remove(_sizeAutoObserverElement); + + if (_supportPassiveEvents) { + removePassiveEventListener(_hostElement, _strMouseTouchMoveEvent, hostOnMouseMove); + removePassiveEventListener(_hostElement, _strMouseTouchEnter, hostOnMouseEnter); + removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); + } + else { + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); + } + + remove(_scrollbarHorizontalElement); + remove(_scrollbarVerticalElement); + if(_scrollbarCornerElement) + remove(_scrollbarCornerElement); + if (!_resizeNone) + scrollbarCornerOnResized(); + + _contentElement.contents() + .unwrap() + .unwrap() + .unwrap(); + + if (_isBody) + removeClass(_htmlElement, _classNameHTMLElement); + + + if (_isTextarea) { + _targetElement.off(_strScroll, textareaOnScroll) + .off('drop', textareaOnDrop) + .off('focus', textareaOnFocus) + .off('focusout', textareaOnFocusOut); + if (_msieVersion > 9 || !_autoUpdateRecommended) + _targetElement.off('input', textareaOnInput); + else { + _targetElement.off(_strKeyDownEvent, textareaOnKeyDown) + .off(_strKeyUpEvent, textareaOnKeyUp); + } + + remove(_textareaCoverElement); + removeClass(_targetElement, _classNameTextareaElement + _strSpace + _classNameTextInherit) + .unwrap() + .removeAttr(LEXICON.s); + remove(_hostElement); + } + else { + removeClass(_targetElement, _classNameHostElement); + removeClass(_hostElement, [ + _classNameHostElement, + _classNameHostResizeDisabled, + _classNameHostRTL, + _classNameHostScrollbarHorizontalHidden, + _classNameHostScrollbarVerticalHidden, + _classNameHostTransition, + _classNameHostScrolling, + _classNameHostOverflow, + _classNameHostOverflowX, + _classNameHostOverflowY, + _classNameThemeNone, + _classNameCache].join(_strSpace)); + } + + for(var i = 0; i < _imgs.length; i++) + FRAMEWORK(_imgs[i]).off('load', imgOnLoad); + _imgs = undefined; + + INSTANCES(pluginTargetElement, 0); + callCallback("onDestroyed"); + + for (var property in _base) + delete _base[property]; + _base = undefined; + }; + + /** + * Scrolls to a given position or element. + * @param coordinates + * 1. Can be "coordinates" which looks like: + * { x : ?, y : ? } OR Object with x and y properties + * { left : ?, top : ? } OR Object with left and top properties + * { l : ?, t : ? } OR Object with l and t properties + * [ ?, ? ] OR Array where the first two element are the coordinates (first is x, second is y) + * ? A single value which stays for both axis + * A value can be a number, a string or a calculation. + * + * Operators: + * [NONE] The current scroll will be overwritten by the value. + * '+=' The value will be added to the current scroll offset + * '-=' The value will be subtracted from the current scroll offset + * '*=' The current scroll wil be multiplicated by the value. + * '/=' The current scroll wil be divided by the value. + * + * Units: + * [NONE] The value is the final scroll amount. final = (value * 1) + * 'px' Same as none + * '%' The value is dependent on the current scroll value. final = ((currentScrollValue / 100) * value) + * 'vw' The value is multiplicated by the viewport width. final = (value * viewportWidth) + * 'vh' The value is multiplicated by the viewport height. final = (value * viewportHeight) + * + * example final values: + * 200, '200px', '50%', '1vw', '1vh', '+=200', '/=1vw', '*=2px', '-=5vh', '+=33%', '+= 50% - 2px', '-= 1vw - 50%' + * + * 2. Can be a HTML or jQuery element: + * The final scroll offset is the offset (without margin) of the given HTML / jQuery element. + * + * 3. Can be a object with a HTML or jQuery element with additional settings: + * { + * el : [HTMLElement, jQuery element], MUST be specified, else this object isn't valid. + * scroll : [string, array, object], Default value is 'always'. + * block : [string, array, object], Default value is 'begin'. + * margin : [number, boolean array, object] Default value is false. + * } + * + * Possible scroll settings are: + * 'always' Scrolls always. + * 'ifneeded' Scrolls only if the element isnt fully in view. + * 'never' Scrolls never. + * + * Possible block settings are: + * 'begin' Both axis shall be docked to the "begin" edge. - The element will be docked to the top and left edge of the viewport. + * 'end' Both axis shall be docked to the "end" edge. - The element will be docked to the bottom and right edge of the viewport. (If direction is RTL to the bottom and left edge.) + * 'center' Both axis shall be docked to "center". - The element will be centered in the viewport. + * 'nearest' The element will be docked to the nearest edge(s). + * + * Possible margin settings are: -- The actual margin of the element wont be affect, this option affects only the final scroll offset. + * [BOOLEAN] If true the css margin of the element will be used, if false no margin will be used. + * [NUMBER] The margin will be used for all edges. + * + * @param duration The duration of the scroll animation, OR a jQuery animation configuration object. + * @param easing The animation easing. + * @param complete The animation complete callback. + * @returns + * { + * x: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *, isRTL: *, isRTLNormalized: *}, + * y: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *} + * } + */ + _base.scroll = function (coordinates, duration, easing, complete) { + if (arguments.length === 0 || coordinates === undefined) { + var infoX = _scrollHorizontalInfo; + var infoY = _scrollVerticalInfo; + var normalizeInvert = _normalizeRTLCache && _isRTL && _rtlScrollBehavior.i; + var normalizeNegate = _normalizeRTLCache && _isRTL && _rtlScrollBehavior.n; + var scrollX = infoX.cs; + var scrollXRatio = infoX.csr; + var maxScrollX = infoX.ms; + scrollXRatio = normalizeInvert ? 1 - scrollXRatio : scrollXRatio; + scrollX = normalizeInvert ? maxScrollX - scrollX : scrollX; + scrollX *= normalizeNegate ? -1 : 1; + maxScrollX *= normalizeNegate ? -1 : 1; + return { + x: { + position: scrollX, + ratio: scrollXRatio, + max: maxScrollX, + handleOffset: infoX.ho, + handleLength: infoX.hl, + handleLengthRatio: infoX.hlr, + trackLength: infoX.tl, + isRTL: _isRTL, + isRTLNormalized: _normalizeRTLCache + }, + y: { + position: infoY.cs, + ratio: infoY.csr, + max: infoY.ms, + handleOffset: infoY.ho, + handleLength: infoY.hl, + handleLengthRatio: infoY.hlr, + trackLength: infoY.tl + } + }; + } + + var normalizeRTL = _normalizeRTLCache; + var coordinatesXAxisProps = [_strX, _strLeft, 'l']; + var coordinatesYAxisProps = [_strY, _strTop, 't']; + var coordinatesOperators = ['+=', '-=', '*=', '/=']; + var i; + var finalScroll = { }; + var doScrollLeft; + var doScrollTop; + var animationOptions; + var durationIsObject = type(duration) == TYPES.o; + var strEnd = 'end'; + var strBegin = 'begin'; + var strCenter = 'center'; + var strNearest = 'nearest'; + var strAlways = 'always'; + var strNever = 'never'; + var strIfNeeded = 'ifneeded'; + var strLength = LEXICON.l; + var settingsAxis; + var settingsScroll; + var settingsBlock; + var settingsMargin; + var finalElement; + var elementObjSettingsAxisValues = [_strX, _strY, 'xy', 'yx']; + var elementObjSettingsBlockValues = [strBegin, strEnd, strCenter, strNearest]; + var elementObjSettingsScrollValues = [strAlways, strNever, strIfNeeded]; + var coordinatesIsElementObj = coordinates.hasOwnProperty('el'); + var possibleElement = coordinatesIsElementObj ? coordinates.el : coordinates; + var possibleElementIsJQuery = possibleElement instanceof FRAMEWORK || JQUERY ? possibleElement instanceof JQUERY : false; + var possibleElementIsHTMLElement = possibleElementIsJQuery ? false : isHTMLElement(possibleElement); + var checkSettingsStringValue = function (currValue, allowedValues) { + for (i = 0; i < allowedValues[strLength]; i++) { + if (currValue === allowedValues[i]) + return true; + } + return false; + }; + var getRawScroll = function (coordinates) { + var rawScroll = {}; + if (type(coordinates) == TYPES.a && coordinates[strLength] > 0) { + rawScroll.x = coordinates[0]; + rawScroll.y = coordinates[1]; + } + else if (type(coordinates) == TYPES.s || type(coordinates) == TYPES.n) { + rawScroll.x = coordinates; + rawScroll.y = coordinates; + } + else if (type(coordinates) == TYPES.o) { + normalizeRTL = type(coordinates.n) == TYPES.b ? coordinates.n : normalizeRTL; + coordinates = extend({}, coordinates); + i = 0; + for (var key in coordinates) { + if (coordinates.hasOwnProperty(key)) { + if (i > 2) + delete coordinates[key]; + i++; + } + } + var getRawScrollValue = function (isX) { + var coordinateProps = isX ? coordinatesXAxisProps : coordinatesYAxisProps; + for (i = 0; i < coordinateProps[strLength]; i++) { + if (coordinateProps[i] in coordinates) { + return coordinates[coordinateProps[i]]; + } + } + }; + rawScroll.x = getRawScrollValue(true); + rawScroll.y = getRawScrollValue(false); + } + return rawScroll; + }; + var getFinalScroll = function (isX, rawScroll) { + var isString = type(rawScroll) == TYPES.s; + if(isString) + _base.update(_strAuto + "+"); + var operator; + var amount; + var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo; + var currScroll = scrollInfo.cs; + var maxScroll = scrollInfo.ms; + var mult = ' * '; + var finalValue; + var isRTLisX = _isRTL && isX; + var normalizeShortcuts = isRTLisX && _rtlScrollBehavior.n && !normalizeRTL; + var strReplace = 'replace'; + if (isString) { + //check operator + if (rawScroll[strLength] > 2) { + var possibleOperator = rawScroll.substr(0, 2); + for (i = 0; i < coordinatesOperators[strLength]; i++) { + if (possibleOperator === coordinatesOperators[i]) { + operator = coordinatesOperators[i]; + break; + } + } + } + + //calculate units and shortcuts + rawScroll = operator !== undefined ? rawScroll.substr(2) : rawScroll; + rawScroll = rawScroll[strReplace](/min/g, 0); //'min' = 0% + rawScroll = rawScroll[strReplace](//g, (normalizeShortcuts ? '-' : _strEmpty) + _strHundredPercent); //'>' = 100% + rawScroll = rawScroll[strReplace](/px/g, _strEmpty); + rawScroll = rawScroll[strReplace](/%/g, mult + (maxScroll * (isRTLisX && _rtlScrollBehavior.n ? -1 : 1) / 100.0)); + rawScroll = rawScroll[strReplace](/vw/g, mult + _viewportSize.w); + rawScroll = rawScroll[strReplace](/vh/g, mult + _viewportSize.h); + amount = parseToZeroOrNumber(parseToZeroOrNumber(window.eval(rawScroll), true).toFixed()); + } + else { + amount = rawScroll; + } + + if (amount !== undefined && !isNaN(amount) && type(amount) == TYPES.n) { + var normalizeIsRTLisX = normalizeRTL && isRTLisX; + var operatorCurrScroll = currScroll * (normalizeIsRTLisX && _rtlScrollBehavior.n ? -1 : 1); + var invert = normalizeIsRTLisX && _rtlScrollBehavior.i; + var negate = normalizeIsRTLisX && _rtlScrollBehavior.n; + operatorCurrScroll = invert ? (maxScroll - operatorCurrScroll) : operatorCurrScroll; + switch (operator) { + case '+=': + finalValue = operatorCurrScroll + amount; + break; + case '-=': + finalValue = operatorCurrScroll - amount; + break; + case '*=': + finalValue = operatorCurrScroll * amount; + break; + case '/=': + finalValue = operatorCurrScroll / amount; + break; + default: + finalValue = amount; + break; + } + finalValue = invert ? maxScroll - finalValue : finalValue; + finalValue *= negate ? -1 : 1; + finalValue = isRTLisX && _rtlScrollBehavior.n ? Math.min(0, Math.max(maxScroll, finalValue)) : Math.max(0, Math.min(maxScroll, finalValue)); + } + return finalValue === currScroll ? undefined : finalValue; + }; + var getPerAxisValue = function (value, valueInternalType, defaultValue, allowedValues) { + var resultDefault = [ defaultValue, defaultValue ]; + var valueType = type(value); + var valueArrLength; + var valueArrItem; + + //value can be [ string, or array of two strings ] + if (valueType == valueInternalType) { + value = [value, value]; + } + else if (valueType == TYPES.a) { + valueArrLength = value[strLength]; + if (valueArrLength > 2 || valueArrLength < 1) + value = resultDefault; + else { + if (valueArrLength === 1) + value[1] = defaultValue; + for (i = 0; i < valueArrLength; i++) { + valueArrItem = value[i]; + if (type(valueArrItem) != valueInternalType || !checkSettingsStringValue(valueArrItem, allowedValues)) { + value = resultDefault; + break; + } + } + } + } + else if (valueType == TYPES.o) + value = [ value[_strX]|| defaultValue, value[_strY] || defaultValue]; + else + value = resultDefault; + return { x : value[0], y : value[1] }; + }; + var generateMargin = function (marginTopRightBottomLeftArray) { + var result = [ ]; + var currValue; + var currValueType; + var valueDirections = [ _strTop, _strRight, _strBottom, _strLeft ]; + for(i = 0; i < marginTopRightBottomLeftArray[strLength]; i++) { + if(i === valueDirections[strLength]) + break; + currValue = marginTopRightBottomLeftArray[i]; + currValueType = type(currValue); + if(currValueType == TYPES.b) + result.push(currValue ? parseToZeroOrNumber(finalElement.css(_strMarginMinus + valueDirections[i])) : 0); + else + result.push(currValueType == TYPES.n ? currValue : 0); + } + return result; + }; + + if (possibleElementIsJQuery || possibleElementIsHTMLElement) { + //get settings + var margin = coordinatesIsElementObj ? coordinates.margin : 0; + var axis = coordinatesIsElementObj ? coordinates.axis : 0; + var scroll = coordinatesIsElementObj ? coordinates.scroll : 0; + var block = coordinatesIsElementObj ? coordinates.block : 0; + var marginDefault = [ 0, 0, 0, 0 ]; + var marginType = type(margin); + var marginLength; + finalElement = possibleElementIsJQuery ? possibleElement : FRAMEWORK(possibleElement); + if (finalElement[strLength] === 0) + return; + + _base.update(_strAuto + "+"); + + //margin can be [ boolean, number, array of 2, array of 4, object ] + if (marginType == TYPES.n || marginType == TYPES.b) + margin = generateMargin([margin, margin, margin, margin]); + else if (marginType == TYPES.a) { + marginLength = margin[strLength]; + if(marginLength === 2) + margin = generateMargin([margin[0], margin[1], margin[0], margin[1]]); + else if(marginLength >= 4) + margin = generateMargin(margin); + else + margin = marginDefault; + } + else if (marginType == TYPES.o) + margin = generateMargin([margin[_strTop], margin[_strRight], margin[_strBottom], margin[_strLeft]]); + else + margin = marginDefault; + + //block = type(block) === TYPES.b ? block ? [ strNearest, strBegin ] : [ strNearest, strEnd ] : block; + settingsAxis = checkSettingsStringValue(axis, elementObjSettingsAxisValues) ? axis : 'xy'; + settingsScroll = getPerAxisValue(scroll, TYPES.s, strAlways, elementObjSettingsScrollValues); + settingsBlock = getPerAxisValue(block, TYPES.s, strBegin, elementObjSettingsBlockValues); + settingsMargin = margin; + + var viewportScroll = { + l: _scrollHorizontalInfo.cs, + t: _scrollVerticalInfo.cs + }; + // use padding element instead of viewport element because padding element has never padding, margin or position applied. + var viewportOffset = _paddingElement.offset(); + + //get coordinates + var elementOffset = finalElement.offset(); + var doNotScroll = { + x : settingsScroll.x == strNever || settingsAxis == _strY, + y : settingsScroll.y == strNever || settingsAxis == _strX + }; + elementOffset[_strTop] -= settingsMargin[0]; + elementOffset[_strLeft] -= settingsMargin[3]; + var elementScrollCoordinates = { + x: Math.round(elementOffset[_strLeft] - viewportOffset[_strLeft] + viewportScroll.l), + y: Math.round(elementOffset[_strTop] - viewportOffset[_strTop] + viewportScroll.t) + }; + if (_isRTL) { + if (!_rtlScrollBehavior.n && !_rtlScrollBehavior.i) + elementScrollCoordinates.x = Math.round(viewportOffset[_strLeft] - elementOffset[_strLeft] + viewportScroll.l); + if (_rtlScrollBehavior.n && normalizeRTL) + elementScrollCoordinates.x *= -1; + if (_rtlScrollBehavior.i && normalizeRTL) + elementScrollCoordinates.x = Math.round(viewportOffset[_strLeft] - elementOffset[_strLeft] + (_scrollHorizontalInfo.ms - viewportScroll.l)); + } + + //measuring is required + if (settingsBlock.x != strBegin || settingsBlock.y != strBegin || settingsScroll.x == strIfNeeded || settingsScroll.y == strIfNeeded || _isRTL) { + var measuringElm = finalElement[0]; + var rawElementSize = _supportTransform ? measuringElm.getBoundingClientRect() : { + width : measuringElm[LEXICON.oW], + height : measuringElm[LEXICON.oH] + }; + var elementSize = { + w: rawElementSize[_strWidth] + settingsMargin[3] + settingsMargin[1], + h: rawElementSize[_strHeight] + settingsMargin[0] + settingsMargin[2] + }; + var finalizeBlock = function(isX) { + var vars = getScrollbarVars(isX); + var wh = vars._wh; + var lt = vars.lt; + var xy = vars.xy; + var blockIsEnd = settingsBlock[xy] == (isX ? _isRTL ? strBegin : strEnd : strEnd); + var blockIsCenter = settingsBlock[xy] == strCenter; + var blockIsNearest = settingsBlock[xy] == strNearest; + var scrollNever = settingsScroll[xy] == strNever; + var scrollIfNeeded = settingsScroll[xy] == strIfNeeded; + var vpSize = _viewportSize[wh]; + var vpOffset = viewportOffset[lt]; + var elSize = elementSize[wh]; + var elOffset = elementOffset[lt]; + var divide = blockIsCenter ? 2 : 1; + var elementCenterOffset = elOffset + (elSize / 2); + var viewportCenterOffset = vpOffset + (vpSize / 2); + var isInView = + elSize <= vpSize + && elOffset >= vpOffset + && elOffset + elSize <= vpOffset + vpSize; + + if(scrollNever) + doNotScroll[xy] = true; + else if(!doNotScroll[xy]) { + if (blockIsNearest || scrollIfNeeded) { + doNotScroll[xy] = scrollIfNeeded ? isInView : false; + blockIsEnd = elSize < vpSize ? elementCenterOffset > viewportCenterOffset : elementCenterOffset < viewportCenterOffset; + } + elementScrollCoordinates[xy] -= blockIsEnd || blockIsCenter ? ((vpSize / divide) - (elSize / divide)) * (isX && _isRTL && normalizeRTL ? -1 : 1) : 0; + } + }; + finalizeBlock(true); + finalizeBlock(false); + } + + if (doNotScroll.y) + delete elementScrollCoordinates.y; + if (doNotScroll.x) + delete elementScrollCoordinates.x; + + coordinates = elementScrollCoordinates; + } + + finalScroll[_strScrollLeft] = getFinalScroll(true, getRawScroll(coordinates).x); + finalScroll[_strScrollTop] = getFinalScroll(false, getRawScroll(coordinates).y); + doScrollLeft = finalScroll[_strScrollLeft] !== undefined; + doScrollTop = finalScroll[_strScrollTop] !== undefined; + + if ((doScrollLeft || doScrollTop) && (duration > 0 || durationIsObject)) { + if (durationIsObject) + _viewportElement.animate(finalScroll, duration); + else { + animationOptions = { + duration: duration, + complete: complete + }; + if (type(easing) == TYPES.a) { + var specialEasing = {}; + specialEasing[_strScrollLeft] = easing[0]; + specialEasing[_strScrollTop] = easing[1]; + animationOptions.specialEasing = specialEasing; + } + else { + animationOptions.easing = easing; + } + _viewportElement.animate(finalScroll, animationOptions); + } + } + else { + if (doScrollLeft) + _viewportElement[_strScrollLeft](finalScroll[_strScrollLeft]); + if (doScrollTop) + _viewportElement[_strScrollTop](finalScroll[_strScrollTop]); + } + }; + + /** + * Stops all scroll animations. + * @returns {*} The current OverlayScrollbars instance (for chaining). + */ + _base.scrollStop = function (param1, param2, param3) { + _viewportElement.stop(param1, param2, param3); + return _base; + }; + + /** + * Returns all relevant elements. + * @param elementName The name of the element which shall be returned. + * @returns {{target: *, host: *, padding: *, viewport: *, content: *, scrollbarHorizontal: {scrollbar: *, track: *, handle: *}, scrollbarVertical: {scrollbar: *, track: *, handle: *}, scrollbarCorner: *} | *} + */ + _base.getElements = function (elementName) { + var obj = { + target: _targetElement[0], + host: _hostElement[0], + padding: _paddingElement[0], + viewport: _viewportElement[0], + content: _contentElement[0], + scrollbarHorizontal: { + scrollbar: _scrollbarHorizontalElement[0], + track: _scrollbarHorizontalTrackElement[0], + handle: _scrollbarHorizontalHandleElement[0] + }, + scrollbarVertical: { + scrollbar: _scrollbarVerticalElement[0], + track: _scrollbarVerticalTrackElement[0], + handle: _scrollbarVerticalHandleElement[0] + }, + scrollbarCorner: _scrollbarCornerElement[0] + }; + return type(elementName) == TYPES.s ? getObjectPropVal(obj, elementName) : obj; + }; + + /** + * Returns a object which describes the current state of this instance. + * @param stateProperty A specific property from the state object which shall be returned. + * @returns {{widthAuto, heightAuto, overflowAmount, hideOverflow, hasOverflow, contentScrollSize, viewportSize, hostSize, autoUpdate} | *} + */ + _base.getState = function (stateProperty) { + var prepare = function (obj) { + if (!FRAMEWORK.isPlainObject(obj)) + return obj; + var extended = extend(true, {}, obj); + var changePropertyName = function (from, to) { + if (extended.hasOwnProperty(from)) { + extended[to] = extended[from]; + delete extended[from]; + } + }; + changePropertyName('w', _strWidth); //change w to width + changePropertyName('h', _strHeight); //change h to height + delete extended.c; //delete c (the 'changed' prop) + return extended; + }; + var obj = { + sleeping: prepare(_isSleeping) || false, + autoUpdate: prepare(!_mutationObserverConnected), + widthAuto: prepare(_widthAutoCache), + heightAuto: prepare(_heightAutoCache), + padding: prepare(_cssPaddingCache), + overflowAmount: prepare(_overflowAmountCache), + hideOverflow: prepare(_hideOverflowCache), + hasOverflow: prepare(_hasOverflowCache), + contentScrollSize: prepare(_contentScrollSizeCache), + viewportSize: prepare(_viewportSize), + hostSize: prepare(_hostSizeCache), + documentMixed : prepare(_documentMixed) + }; + return type(stateProperty) == TYPES.s ? getObjectPropVal(obj, stateProperty) : obj; + }; + + /** + * Gets all or specific extension instance. + * @param extName The name of the extension from which the instance shall be got. + * @returns {{}} The instance of the extension with the given name or undefined if the instance couldn't be found. + */ + _base.ext = function(extName) { + var result; + var privateMethods = _extensionsPrivateMethods.split(' '); + var i = 0; + if(type(extName) == TYPES.s) { + if(_extensions.hasOwnProperty(extName)) { + result = extend(true, {}, _extensions[extName]); + for (; i < privateMethods.length; i++) + delete result[privateMethods[i]]; + } + } + else { + result = { }; + for(i in _extensions) + result[i] = extend(true, { }, _base.ext(i)); + } + return result; + }; + + /** + * Adds a extension to this instance. + * @param extName The name of the extension which shall be added. + * @param extensionOptions The extension options which shall be used. + * @returns {{}} The instance of the added extension or undefined if the extension couldn't be added properly. + */ + _base.addExt = function(extName, extensionOptions) { + var registeredExtensionObj = window[PLUGINNAME].extension(extName); + var instance; + var instanceAdded; + var instanceContract; + var contractResult; + var contractFulfilled = true; + if(registeredExtensionObj) { + if(!_extensions.hasOwnProperty(extName)) { + instance = registeredExtensionObj.extension.call(_base, + extend(true, { }, registeredExtensionObj.defaultOptions), + FRAMEWORK, + COMPATIBILITY); + + if (instance) { + instanceContract = instance.contract; + if (type(instanceContract) == TYPES.f) { + contractResult = instanceContract(window); + contractFulfilled = type(contractResult) == TYPES.b ? contractResult : contractFulfilled; + } + if(contractFulfilled) { + _extensions[extName] = instance; + instanceAdded = instance.added; + if(type(instanceAdded) == TYPES.f) + instanceAdded(extensionOptions); + + return _base.ext(extName); + } + } + } + else + return _base.ext(extName); + } + else + console.warn("A extension with the name \"" + extName + "\" isn't registered."); + }; + + /** + * Removes a extension from this instance. + * @param extName The name of the extension which shall be removed. + * @returns {boolean} True if the extension was removed, false otherwise e.g. if the extension wasn't added before. + */ + _base.removeExt = function(extName) { + var instance = _extensions[extName]; + var instanceRemoved; + if(instance) { + delete _extensions[extName]; + + instanceRemoved = instance.removed; + if(type(instanceRemoved) == TYPES.f) + instanceRemoved(); + + return true; + } + return false; + }; + + /** + * Constructs the plugin. + * @param targetElement The element to which the plugin shall be applied. + * @param options The initial options of the plugin. + * @param extensions The extension(s) which shall be added right after the initialization. + * @returns {boolean} True if the plugin was successfully initialized, false otherwise. + */ + function construct(targetElement, options, extensions) { + _defaultOptions = globals.defaultOptions; + _nativeScrollbarStyling = globals.nativeScrollbarStyling; + _nativeScrollbarSize = extend(true, {}, globals.nativeScrollbarSize); + _nativeScrollbarIsOverlaid = extend(true, {}, globals.nativeScrollbarIsOverlaid); + _overlayScrollbarDummySize = extend(true, {}, globals.overlayScrollbarDummySize); + _rtlScrollBehavior = extend(true, {}, globals.rtlScrollBehavior); + + //parse & set options but don't update + setOptions(extend(true, { }, _defaultOptions, options)); + + //check if the plugin hasn't to be initialized + if (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.x && !_currentPreparedOptions.nativeScrollbarsOverlaid.initialize) { + callCallback("onInitializationWithdrawn"); + return false; + } + + _cssCalc = globals.cssCalc; + _msieVersion = globals.msie; + _autoUpdateRecommended = globals.autoUpdateRecommended; + _supportTransition = globals.supportTransition; + _supportTransform = globals.supportTransform; + _supportPassiveEvents = globals.supportPassiveEvents; + _supportResizeObserver = globals.supportResizeObserver; + _supportMutationObserver = globals.supportMutationObserver; + _restrictedMeasuring = globals.restrictedMeasuring; + _documentElement = FRAMEWORK(targetElement.ownerDocument); + _windowElement = FRAMEWORK(_documentElement[0].defaultView || _documentElement[0].parentWindow); + _htmlElement = findFirst(_documentElement, 'html'); + _bodyElement = findFirst(_htmlElement, 'body'); + _targetElement = FRAMEWORK(targetElement); + _isTextarea = _targetElement.is('textarea'); + _isBody = _targetElement.is('body'); + _documentMixed = _documentElement[0] !== document; + + var initBodyScroll; + if (_isBody) { + initBodyScroll = {}; + initBodyScroll.l = Math.max(_targetElement[_strScrollLeft](), _htmlElement[_strScrollLeft](), _windowElement[_strScrollLeft]()); + initBodyScroll.t = Math.max(_targetElement[_strScrollTop](), _htmlElement[_strScrollTop](), _windowElement[_strScrollTop]()); + } + + //build Hide-scrollbars DOM + if (_isTextarea) { + _targetElement.wrap(generateDiv(_classNameHostTextareaElement)); + addClass(_targetElement, _classNameTextareaElement + _strSpace + _classNameTextInherit); + _hostElement = _targetElement.parent(); + var hostElementCSS = {}; + if (!_currentPreparedOptions.sizeAutoCapable) { + hostElementCSS[_strWidth] = _targetElement.css(_strWidth); + hostElementCSS[_strHeight] = _targetElement.css(_strHeight); + } + _hostElement.css(hostElementCSS) + .wrapInner(generateDiv(_classNameContentElement + _strSpace + _classNameTextInherit)) + .wrapInner(generateDiv(_classNameViewportElement + _strSpace + _classNameTextInherit)) + .wrapInner(generateDiv(_classNamePaddingElement + _strSpace + _classNameTextInherit)); + _contentElement = findFirst(_hostElement, _strDot + _classNameContentElement); + _viewportElement = findFirst(_hostElement, _strDot + _classNameViewportElement); + _paddingElement = findFirst(_hostElement, _strDot + _classNamePaddingElement); + _textareaCoverElement = FRAMEWORK(generateDiv(_classNameTextareaCoverElement)); + _contentElement.prepend(_textareaCoverElement); + + _targetElement.on(_strScroll, textareaOnScroll) + .on('drop', textareaOnDrop) + .on('focus', textareaOnFocus) + .on('focusout', textareaOnFocusOut); + if (_msieVersion > 9 || !_autoUpdateRecommended) { + _targetElement.on('input', textareaOnInput); + } + else { + _targetElement.on(_strKeyDownEvent, textareaOnKeyDown) + .on(_strKeyUpEvent, textareaOnKeyUp); + } + } else { + addClass(_targetElement, _classNameHostElement); + _hostElement = _targetElement; + _hostElement.wrapInner(generateDiv(_classNameContentElement)) + .wrapInner(generateDiv(_classNameViewportElement)) + .wrapInner(generateDiv(_classNamePaddingElement)); + _contentElement = findFirst(_hostElement, _strDot + _classNameContentElement); + _viewportElement = findFirst(_hostElement, _strDot + _classNameViewportElement); + _paddingElement = findFirst(_hostElement, _strDot + _classNamePaddingElement); + + //add transitionend event + _contentElement.on(_strTransitionEndEvent, function (event) { + if (_autoUpdateCache === true) + return; + event = event.originalEvent || event; + if (isSizeAffectingCSSProperty(event.propertyName)) + update(_strAuto); + }); + } + + buildScrollbars(); + + //add scroll event + if (_supportPassiveEvents) + addPassiveEventListener(_viewportElement, _strScroll, viewportOnScroll); + else + _viewportElement.on(_strScroll, viewportOnScroll); + + if (_nativeScrollbarStyling) + addClass(_viewportElement, _nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y ? _classNameViewportNativeScrollbarsOverlaid : _classNameViewportNativeScrollbarsInvisible); + + //build mutation observers + if (_supportMutationObserver) { + var mutationObserver = COMPATIBILITY.mO(); + var contentLastUpdate = COMPATIBILITY.now(); + var mutationTarget; + var mutationAttrName; + var contentTimeout; + var now; + var sizeAuto; + var action; + + _mutationObserverHost = new mutationObserver(function (mutations) { + if (!_initialized || _isSleeping) + return; + + var doUpdate = false; + //var doUpdateScrollbars = false; + var mutation; + FRAMEWORK.each(mutations, function () { + mutation = this; + mutationTarget = mutation.target; + mutationAttrName = mutation.attributeName; + + if (mutationAttrName === LEXICON.c) + doUpdate = hostClassNamesChanged(mutation.oldValue, mutationTarget.className); + else if (mutationAttrName === LEXICON.s) + doUpdate = mutation.oldValue !== mutationTarget[LEXICON.s].cssText; + else + doUpdate = true; + + if (doUpdate) + return false; + }); + + if (doUpdate) + _base.update(_strAuto); + /* + if(doUpdateScrollbars) { + refreshScrollbarHandleLength(true); + refreshScrollbarHandleOffset(true, _scrollHorizontalInfo.cs); + refreshScrollbarHandleLength(false); + refreshScrollbarHandleOffset(false, _scrollVerticalInfo.cs); + } + */ + }); + _mutationObserverContent = new mutationObserver(function (mutations) { + if (!_initialized || _isSleeping) + return; + + var doUpdate = false; + var mutation; + FRAMEWORK.each(mutations, function () { + mutation = this; + doUpdate = isUnknownMutation(mutation); + return !doUpdate; + }); + + if (doUpdate) { + now = COMPATIBILITY.now(); + sizeAuto = (_heightAutoCache || _widthAutoCache); + action = function () { + if(!_destroyed) { + contentLastUpdate = now; + + //if cols, rows or wrap attr was changed + if (_isTextarea) + textareaUpdate(); + + if (sizeAuto) + update(); + else + _base.update(_strAuto); + } + }; + clearTimeout(contentTimeout); + if (_mutationObserverContentLag <= 0 || now - contentLastUpdate > _mutationObserverContentLag || !sizeAuto) + action(); + else + contentTimeout = setTimeout(action, _mutationObserverContentLag); + } + }); + } + + //build resize observer for the host element + if (_isBody) { + addClass(_htmlElement, _classNameHTMLElement); + + //apply the body scroll to handle it right in the update method + _viewportElement[_strScrollLeft](initBodyScroll.l); + _viewportElement[_strScrollTop](initBodyScroll.t); + } + _sizeObserverElement = FRAMEWORK(generateDiv('os-resize-observer-host')); + _hostElement.prepend(_sizeObserverElement); + addResizeObserver(_sizeObserverElement, hostOnResized); + + //update for the first time + hostOnResized(); //initialize cache for host size + _base.update(_strAuto); //initialize cache for content + + //add the transition class for transitions AFTER the first update (for preventing unwanted transitions) + setTimeout(function () { + if (_supportTransition && !_destroyed) + addClass(_hostElement, _classNameHostTransition) + }, 333); + + //the plugin is initialized now! + _initialized = true; + callCallback("onInitialized"); + + //add extensions + if(type(extensions) == TYPES.s) + extensions = [ extensions ]; + if(COMPATIBILITY.isA(extensions)) + FRAMEWORK.each(extensions, function () {_base.addExt(this); }); + else if(FRAMEWORK.isPlainObject(extensions)) + FRAMEWORK.each(extensions, function (key, value) { _base.addExt(key, value); }); + + return _initialized; + } + + if (construct(pluginTargetElement, options, extensions)) { + INSTANCES(pluginTargetElement, _base); + return _base; + } + _base = undefined; + } + + /** + * Initializes a new OverlayScrollbarsInstance object or changes options if already initialized or returns the current instance. + * @param pluginTargetElements The elements to which the Plugin shall be initialized. + * @param options The custom options with which the plugin shall be initialized. + * @param extensions The extension(s) which shall be added right after initialization. + * @returns {*} + */ + window[PLUGINNAME] = function(pluginTargetElements, options, extensions) { + if(arguments.length === 0) + return this; + + initOverlayScrollbarsStatics(); + + var arr = [ ]; + var inst; + var result; + if(FRAMEWORK.isPlainObject(options)) { + if (pluginTargetElements && pluginTargetElements.length) { + FRAMEWORK.each(pluginTargetElements, function () { + inst = this; + if(inst !== undefined) + arr.push(OverlayScrollbarsInstance(inst, options, extensions, _pluginsGlobals, _pluginsAutoUpdateLoop)); + }); + result = arr.length > 1 ? arr : arr[0]; + } + else + result = OverlayScrollbarsInstance(pluginTargetElements, options, extensions, _pluginsGlobals, _pluginsAutoUpdateLoop); + } + else if(pluginTargetElements) { + if(pluginTargetElements.length && pluginTargetElements.length > 0) { + FRAMEWORK.each(pluginTargetElements, function() { + inst = INSTANCES(this); + if(options === '!') { + if(inst instanceof window[PLUGINNAME]) + arr.push(inst); + } + else + arr.push(inst); + }); + result = arr.length > 1 ? arr : arr[0]; + } + else + result = INSTANCES(pluginTargetElements); + } + return result; + }; + + /** + * Returns a object which contains global information about the plugin and each instance of it. + * The returned object is just a copy, that means that changes to the returned object won't have any effect to the original object. + */ + window[PLUGINNAME].globals = function () { + initOverlayScrollbarsStatics(); + var globals = FRAMEWORK.extend(true, { }, _pluginsGlobals); + delete globals['msie']; + return globals; + }; + + /** + * Gets or Sets the default options for each new plugin initialization. + * @param newDefaultOptions The object with which the default options shall be extended. + */ + window[PLUGINNAME].defaultOptions = function(newDefaultOptions) { + initOverlayScrollbarsStatics(); + var currDefaultOptions = _pluginsGlobals.defaultOptions; + if(newDefaultOptions === undefined) + return FRAMEWORK.extend(true, { }, currDefaultOptions); + + //set the new default options + _pluginsGlobals.defaultOptions = FRAMEWORK.extend(true, { }, currDefaultOptions , _pluginsOptions.v(newDefaultOptions, _pluginsOptions.t, true)); + }; + + /** + * Registers, Unregisters or returns a extension. + * Register: Pass the name and the extension. (defaultOptions is optional) + * Unregister: Pass the name and anything except a function as extension parameter. + * Get extension: Pass the name of the extension which shall be got. + * Get all extensions: Pass no arguments. + * @param extensionName The name of the extension which shall be registered, unregistered or returned. + * @param extension A function which generates the instance of the extension or anything other to remove a already registered extension. + * @param defaultOptions The default options which shall be used for the registered extension. + */ + window[PLUGINNAME].extension = function(extensionName, extension, defaultOptions) { + var extNameTypeString = COMPATIBILITY.type(extensionName) == TYPES.s; + var argLen = arguments[LEXICON.l]; + var i = 0; + if(argLen < 1 || !extNameTypeString) { + //return a copy of all extension objects + return FRAMEWORK.extend(true, { length : _pluginsExtensions[LEXICON.l] }, _pluginsExtensions); + } + else if(extNameTypeString) { + if(COMPATIBILITY.type(extension) == TYPES.f) { + //register extension + _pluginsExtensions.push({ + name : extensionName, + extension : extension, + defaultOptions : defaultOptions + }); + } + else { + for(; i < _pluginsExtensions[LEXICON.l]; i++) { + if (_pluginsExtensions[i].name === extensionName) { + if(argLen > 1) + _pluginsExtensions.splice(i, 1); //remove extension + else + return FRAMEWORK.extend(true, { }, _pluginsExtensions[i]); //return extension with the given name + } + } + } + } + }; + + return window[PLUGINNAME]; + })(); + + if(JQUERY && JQUERY.fn) { + /** + * The jQuery initialization interface. + * @param options The initial options for the construction of the plugin. To initialize the plugin, this option has to be a object! If it isn't a object, the instance(s) are returned and the plugin wont be initialized. + * @param extensions The extension(s) which shall be added right after initialization. + * @returns {*} After initialization it returns the jQuery element array, else it returns the instance(s) of the elements which are selected. + */ + JQUERY.fn.overlayScrollbars = function (options, extensions) { + var _elements = this; + if(JQUERY.isPlainObject(options)) { + JQUERY.each(_elements, function() { PLUGIN(this, options, extensions); }); + return _elements; + } + else + return PLUGIN(_elements, options); + }; + } + return PLUGIN; + } +)); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/OverlayScrollbars.min.css b/apps/config_explorer/appserver/static/OverlayScrollbars.min.css new file mode 100755 index 00000000..e405c52f --- /dev/null +++ b/apps/config_explorer/appserver/static/OverlayScrollbars.min.css @@ -0,0 +1,13 @@ +/*! + * OverlayScrollbars + * https://github.com/KingSora/OverlayScrollbars + * + * Version: 1.5.3 + * + * Copyright KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + * Date: 07.11.2018 + */ +html.os-html,html.os-html>.os-host{display:block;overflow:hidden;box-sizing:border-box;height:100%!important;width:100%!important;min-width:100%!important;min-height:100%!important;margin:0!important;position:absolute!important}.os-padding,.os-viewport{top:0;left:0;right:0;margin:0;padding:0;bottom:0}html.os-html>.os-host>.os-padding{position:absolute}body.os-dragging,body.os-dragging *{cursor:default}.os-host,.os-host-textarea{position:relative;overflow:visible!important;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.os-host-flexbox{overflow:hidden!important;display:flex}.os-host-flexbox>.os-padding>.os-viewport>.os-content{display:flex}#hs-dummy-scrollbar-size{position:fixed;opacity:0;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';visibility:hidden;overflow:scroll;height:500px;width:500px}#hs-dummy-scrollbar-size,.os-viewport{-ms-overflow-style:scrollbar!important}.os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar-corner,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner{display:none!important;width:0!important;height:0!important;visibility:hidden!important;background:0 0!important}.os-content-glue{max-height:100%;max-width:100%;width:100%;pointer-events:none}.os-padding{direction:inherit;position:absolute;overflow:visible;width:auto!important;height:auto!important;z-index:1}.os-host-overflow>.os-padding,.os-viewport{overflow:hidden}.os-viewport{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;-webkit-overflow-scrolling:touch}.os-content-arrange{position:absolute;z-index:-1;min-height:1px;min-width:1px;pointer-events:none}.os-content{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:100%;visibility:visible}.os-content>.os-textarea{direction:inherit!important;float:none!important;margin:0!important;max-height:none!important;max-width:none!important;border:none!important;border-radius:0!important;background:0 0!important;outline:transparent 0!important;overflow:hidden!important;resize:none!important;position:absolute!important;top:0!important;left:0!important;z-index:1;padding:0}.os-host-rtl>.os-padding>.os-viewport>.os-content>.os-textarea{right:0!important}.os-content>.os-textarea-cover{z-index:-1;pointer-events:none}.os-content>.os-textarea[wrap=off]{white-space:pre!important;margin:0!important}.os-text-inherit{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-align:inherit;text-shadow:inherit;text-overflow:inherit;letter-spacing:inherit;word-spacing:inherit;line-height:inherit;unicode-bidi:inherit;direction:inherit;color:inherit;cursor:text}.os-resize-observer,.os-resize-observer-host{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.os-resize-observer-host{padding:inherit;border:solid inherit;box-sizing:border-box}.os-resize-observer-host:after{content:''}.os-resize-observer-host:after,.os-resize-observer-host>.os-resize-observer{height:200%;width:200%;padding:inherit;border:inherit;margin:0;display:block;box-sizing:content-box}.os-resize-observer.observed,object.os-resize-observer{box-sizing:border-box!important}.os-size-auto-observer{box-sizing:inherit!important;height:100%;width:inherit;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.os-size-auto-observer>.os-resize-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-resize-observer-item{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;z-index:-1;opacity:0;direction:ltr!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer-item-final{position:absolute;left:0;top:0;-webkit-transition:none!important;transition:none!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer{-webkit-animation-duration:1ms;animation-duration:1ms;-webkit-animation-name:hs-resize-observer-dummy-animation;animation-name:hs-resize-observer-dummy-animation}.os-host-transition>.os-scrollbar,.os-host-transition>.os-scrollbar-corner{-webkit-transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s;transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s}html.os-html>.os-host>.os-scrollbar{position:absolute;z-index:999999}.os-scrollbar,.os-scrollbar-corner{position:absolute;opacity:1;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';z-index:1}.os-scrollbar-corner{bottom:0;right:0}.os-scrollbar{pointer-events:none}.os-scrollbar-handle,.os-scrollbar-track{pointer-events:auto;width:100%;height:100%}.os-scrollbar-track{position:relative;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-handle-off,.os-scrollbar-track-off{pointer-events:none}.os-scrollbar.os-scrollbar-unusable,.os-scrollbar.os-scrollbar-unusable *{pointer-events:none!important}.os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-host-rtl>.os-scrollbar-horizontal{right:0}.os-host-rtl>.os-scrollbar-corner,.os-host-rtl>.os-scrollbar-vertical{right:auto;left:0}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-corner,.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-corner,.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal,.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical,.os-padding+.os-scrollbar-corner,.os-scrollbar-auto-hidden,.os-scrollbar-horizontal+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical+.os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner{opacity:0;visibility:hidden;pointer-events:none}.os-scrollbar-corner-resize-both{cursor:nwse-resize}.os-host-rtl>.os-scrollbar-corner-resize-both{cursor:nesw-resize}.os-scrollbar-corner-resize-horizontal{cursor:ew-resize}.os-scrollbar-corner-resize-vertical{cursor:ns-resize}.os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize{cursor:default}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-vertical{top:0;bottom:0}.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal,.os-host-rtl.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal{right:0;left:0}.os-scrollbar-corner.os-scrollbar-corner-resize,.os-scrollbar:hover{opacity:1!important;visibility:visible!important}.os-scrollbar-corner.os-scrollbar-corner-resize{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB3aWR0aD0iMTAiICAgaGVpZ2h0PSIxMCIgICB2ZXJzaW9uPSIxLjEiPiAgPGcgICAgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwNDIuMzYyMikiICAgICBzdHlsZT0iZGlzcGxheTppbmxpbmUiPiAgICA8cGF0aCAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eTowLjQ5NDExNzY1O2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lIiAgICAgICBkPSJtIDcuNDI0MjE4NywxMDQyLjM2MjIgYyAtMC43MjM1NzkyLDAgLTEuMzEwMTU2MiwwLjU4NjYgLTEuMzEwMTU2MiwxLjMxMDIgMCwwLjI5OSAwLjEwNDM0MTksMC41NzEgMC4yNzI5NDkyLDAuNzkxNSAwLjIwOTEwMjQsMC4xNDEzIDAuNDY1NjIwNiwwLjIxODQgMC43MzY5NjI5LDAuMjE4NCAwLjcyMzU3OTMsMCAxLjMxMDE1NjMsLTAuNTg2NiAxLjMxMDE1NjMsLTEuMzEwMiAwLC0wLjI3MTMgLTAuMDc3MDkzLC0wLjUyNzggLTAuMjE4MzU5NCwtMC43MzcgLTAuMjIwNDk0MSwtMC4xNjg2IC0wLjQ5MjU0NDMsLTAuMjcyOSAtMC43OTE1NTI4LC0wLjI3MjkgeiBtIDAsMy4wODQzIGMgLTAuNzIzNTc5MiwwIC0xLjMxMDE1NjIsMC41ODY2IC0xLjMxMDE1NjIsMS4zMTAyIDAsMC4yOTkgMC4xMDQzNDE5LDAuNTcxIDAuMjcyOTQ5MiwwLjc5MTUgMC4yMDkxMDI0LDAuMTQxMyAwLjQ2NTYyMDYsMC4yMTg0IDAuNzM2OTYyOSwwLjIxODQgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjYgMS4zMTAxNTYzLC0xLjMxMDIgMCwtMC4yNzEzIC0wLjA3NzA5MywtMC41Mjc4IC0wLjIxODM1OTQsLTAuNzM2OSAtMC4yMjA0OTQxLC0wLjE2ODYgLTAuNDkyNTQ0MywtMC4yNzMgLTAuNzkxNTUyOCwtMC4yNzMgeiBtIC0zLjA4NDMyNjEsMCBjIC0wLjcyMzU3OTMsMCAtMS4zMTAxNTYzLDAuNTg2NiAtMS4zMTAxNTYzLDEuMzEwMiAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MSAwLjI3Mjk0OTIsMC43OTE1IDAuMjA5MTAyNCwwLjE0MTMgMC40NjU2MjA3LDAuMjE4NCAwLjczNjk2MjksMC4yMTg0IDAuNzIzNTc5MywwIDEuMzEwMTU2MywtMC41ODY2IDEuMzEwMTU2MywtMS4zMTAyIDAsLTAuMjcxMyAtMC4wNzcwOTMsLTAuNTI3OCAtMC4yMTgzNTk0LC0wLjczNjkgLTAuMjIwNDk0LC0wLjE2ODYgLTAuNDkyNTQ0MiwtMC4yNzMgLTAuNzkxNTUyNywtMC4yNzMgeiBtIC0zLjAyOTczNjQsMy4wMjk4IEMgMC41ODY1NzY5MywxMDQ4LjQ3NjMgMCwxMDQ5LjA2MjggMCwxMDQ5Ljc4NjQgYyAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MTEgMC4yNzI5NDkyMiwwLjc5MTYgMC4yMDkxMDIyOSwwLjE0MTIgMC40NjU2MjA2NSwwLjIxODMgMC43MzY5NjI4OCwwLjIxODMgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjUgMS4zMTAxNTYzLC0xLjMxMDEgMCwtMC4yNzE0IC0wLjA3NzA5MywtMC41Mjc5IC0wLjIxODM1OTQsLTAuNzM3IC0wLjIyMDQ5NDEsLTAuMTY4NiAtMC40OTI1NDQzLC0wLjI3MjkgLTAuNzkxNTUyOCwtMC4yNzI5IHogbSAzLjAyOTczNjQsMCBjIC0wLjcyMzU3OTMsMCAtMS4zMTAxNTYzLDAuNTg2NSAtMS4zMTAxNTYzLDEuMzEwMSAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MTEgMC4yNzI5NDkyLDAuNzkxNiAwLjIwOTEwMjQsMC4xNDEyIDAuNDY1NjIwNywwLjIxODMgMC43MzY5NjI5LDAuMjE4MyAwLjcyMzU3OTMsMCAxLjMxMDE1NjMsLTAuNTg2NSAxLjMxMDE1NjMsLTEuMzEwMSAwLC0wLjI3MTQgLTAuMDc3MDkzLC0wLjUyNzkgLTAuMjE4MzU5NCwtMC43MzcgLTAuMjIwNDk0LC0wLjE2ODYgLTAuNDkyNTQ0MiwtMC4yNzI5IC0wLjc5MTU1MjcsLTAuMjcyOSB6IG0gMy4wODQzMjYxLDAgYyAtMC43MjM1NzkyLDAgLTEuMzEwMTU2MiwwLjU4NjUgLTEuMzEwMTU2MiwxLjMxMDEgMCwwLjI5OSAwLjEwNDM0MTksMC41NzExIDAuMjcyOTQ5MiwwLjc5MTYgMC4yMDkxMDI0LDAuMTQxMiAwLjQ2NTYyMDYsMC4yMTgzIDAuNzM2OTYyOSwwLjIxODMgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjUgMS4zMTAxNTYzLC0xLjMxMDEgMCwtMC4yNzE0IC0wLjA3NzA5MywtMC41Mjc5IC0wLjIxODM1OTQsLTAuNzM3IC0wLjIyMDQ5NDEsLTAuMTY4NiAtMC40OTI1NDQzLC0wLjI3MjkgLTAuNzkxNTUyOCwtMC4yNzI5IHoiLz4gIDwvZz4gIDxnICAgICBzdHlsZT0iZGlzcGxheTppbmxpbmUiPiAgICA8cGF0aCAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lIiAgICAgICBkPSJtIDguMjE1NzcxNSwwLjI3Mjk0OTIyIGMgMC4xNDEyNjY3LDAuMjA5MTAyMjkgMC4yMTgzNTk0LDAuNDY1NjIwNjUgMC4yMTgzNTk0LDAuNzM2OTYyODggMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDc2IC0wLjIwNTUxNzYsLTAuNzk3Nzk2NTkgLTAuNTE4NjAzNSwtMS4wMzcyMDY5OCB6IG0gMCwzLjA4NDMyNjE4IGMgMC4xNDEyNjY3LDAuMjA5MTAyMyAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MiAtMS4zMTAxNTYzLDEuMzEwMTU2MiAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTkzIDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY3IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogbSAtMy4wODQzMjYyLDAgYyAwLjE0MTI2NjcsMC4yMDkxMDIzIDAuMjE4MzU5NCwwLjQ2NTYyMDYgMC4yMTgzNTk0LDAuNzM2OTYyOSAwLDAuNzIzNTc5MyAtMC41ODY1NzcsMS4zMTAxNTYyIC0xLjMxMDE1NjMsMS4zMTAxNTYyIC0wLjI3MTM0MjIsMCAtMC41Mjc4NjA1LC0wLjA3NzA5MyAtMC43MzY5NjI5LC0wLjIxODM1OTMgMC4yMzk0MTA0LDAuMzEzMDg1OSAwLjYxMjYzNjMsMC41MTg2MDM1IDEuMDM3MjA3MSwwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYyLC0wLjU4NjU3NyAxLjMxMDE1NjIsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NSwtMC43OTc3OTY3IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogTSAyLjEwMTcwOSw2LjM4NzAxMTcgYyAwLjE0MTI2NjcsMC4yMDkxMDI0IDAuMjE4MzU5NCwwLjQ2NTYyMDYgMC4yMTgzNTk0LDAuNzM2OTYyOSAwLDAuNzIzNTc5MyAtMC41ODY1NzcsMS4zMTAxNTYzIC0xLjMxMDE1NjMsMS4zMTAxNTYzIC0wLjI3MTM0MjIzLDAgLTAuNTI3ODYwNTksLTAuMDc3MDkzIC0wLjczNjk2Mjg4LC0wLjIxODM1OTQgMC4yMzk0MTAzOSwwLjMxMzA4NTkgMC42MTI2MzYyMiwwLjUxODYwMzUgMS4wMzcyMDY5OCwwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogbSAzLjAyOTczNjMsMCBjIDAuMTQxMjY2NywwLjIwOTEwMjQgMC4yMTgzNTk0LDAuNDY1NjIwNiAwLjIxODM1OTQsMC43MzY5NjI5IDAsMC43MjM1NzkzIC0wLjU4NjU3NywxLjMxMDE1NjMgLTEuMzEwMTU2MywxLjMxMDE1NjMgLTAuMjcxMzQyMiwwIC0wLjUyNzg2MDUsLTAuMDc3MDkzIC0wLjczNjk2MjksLTAuMjE4MzU5NCAwLjIzOTQxMDQsMC4zMTMwODU5IDAuNjEyNjM2MywwLjUxODYwMzUgMS4wMzcyMDcxLDAuNTE4NjAzNSAwLjcyMzU3OTMsMCAxLjMxMDE1NjIsLTAuNTg2NTc3IDEuMzEwMTU2MiwtMS4zMTAxNTYzIDAsLTAuNDI0NTcwOCAtMC4yMDU1MTc1LC0wLjc5Nzc5NjYgLTAuNTE4NjAzNSwtMS4wMzcyMDcgeiBtIDMuMDg0MzI2MiwwIGMgMC4xNDEyNjY3LDAuMjA5MTAyNCAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHoiIC8+ICA8L2c+PC9zdmc+);background-repeat:no-repeat;background-position:100% 100%;pointer-events:auto!important}.os-host-rtl>.os-scrollbar-corner.os-scrollbar-corner-resize{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.os-host-overflow{overflow:hidden!important}@-webkit-keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}@keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}.os-theme-none>.os-scrollbar-corner,.os-theme-none>.os-scrollbar-horizontal,.os-theme-none>.os-scrollbar-vertical{display:none!important}.os-theme-none>.os-scrollbar-corner-resize{display:block!important;min-width:10px;min-height:10px}.os-theme-dark>.os-scrollbar-horizontal,.os-theme-light>.os-scrollbar-horizontal{right:10px;height:10px}.os-theme-dark>.os-scrollbar-vertical,.os-theme-light>.os-scrollbar-vertical{bottom:10px;width:10px}.os-theme-dark.os-host-rtl>.os-scrollbar-horizontal,.os-theme-light.os-host-rtl>.os-scrollbar-horizontal{left:10px;right:0}.os-theme-dark>.os-scrollbar-corner,.os-theme-light>.os-scrollbar-corner{height:10px;width:10px;background-color:transparent}.os-theme-dark>.os-scrollbar,.os-theme-light>.os-scrollbar{padding:2px;box-sizing:border-box;background:0 0}.os-theme-dark>.os-scrollbar.os-scrollbar-unusable,.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar.os-scrollbar-unusable,.os-theme-light>.os-scrollbar>.os-scrollbar-track{background:0 0}.os-theme-dark>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle{min-width:30px}.os-theme-dark>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle{min-height:30px}.os-theme-dark.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{-webkit-transition:background-color .3s;transition:background-color .3s}.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{border-radius:10px}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(0,0,0,.4)}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(255,255,255,.4)}.os-theme-dark>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-theme-light>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:rgba(0,0,0,.7)}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:rgba(255,255,255,.7)}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{content:'';position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-theme-dark.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before{display:none}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-host-rtl.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-host-rtl.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{right:-6px;left:-2px} \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/config.css b/apps/config_explorer/appserver/static/config.css new file mode 100755 index 00000000..54ad289e --- /dev/null +++ b/apps/config_explorer/appserver/static/config.css @@ -0,0 +1,1128 @@ +body { + display: flex; + flex-direction: column; + position: fixed; + width: 100%; + height: 100%; +} +header { + flex: 0 0 auto; +} +.dashboard-body { + flex: 1 0 0%; + position: relative; + overflow: hidden; + background-color: #1e1e1e; +} +.dashboard-title { + display: none; +} +.panel-body.html { + /* this only appears during loading */ + background-color: #1e1e1e; +} +.red { + color: #dd6a6f; +} +.bold { + font-weight: bold; +} +.dashboard-body a, +.dashboard-body a:hover { + color: #00A4FD +} +.dashboard-body.ce_loading { + height: 100%; + position: absolute; + width: 100%; +} +.ce_loading .ce_wrap { + visibility: hidden; +} +.ce_no_write_access .ce_add_file, +.ce_no_write_access .ce_add_folder, +.ce_no_write_access .ce_upload_file, +.ce_no_write_access .ce_rename_icon, +.ce_no_write_access .ce_delete_icon { + display: none; +} +.ce_no_run_access .ce_app_run { + display: none; +} +.ce_no_settings_access .ce_app_settings { + display: none; +} +.ce_no_git_access .ce_app_changelog { + display: none; +} +.dashboard-body * { + box-sizing: border-box; +} +.dashboard-body a:focus, +.dashboard-body a:active { + box-shadow: none !important; +} +.ce_bg_image { + position: absolute; + right: -37px; + opacity: 0.2; + width: 450px; + bottom: -40px; +} +.ce_tab_saving_icon { + color: #00A4FD; + animation: pulsate 1s infinite linear; + z-index: 9; +} +@keyframes pulsate{ + 0% { + transform: scale(0.8, 0.8); + opacity: 0.2; + } + 50% { + transform: scale(1.2, 1.2); + opacity: 1.0; + } + 100% { + transform: scale(0.8, 0.8); + opacity: 0.2; + } +} +.ce_cancel { + text-align: center; + margin: 30px 10px; +} +.ce_timer { + color: #ccc; + text-align: center; +} +.ce_wrap { + position: absolute; + background-color: #353535; + top: 0; + bottom: 0; + right: 0; + left: 0; +} +.ce_file_wrap i{ + margin-left: -18px; + position: absolute; +} +.ce_leftnav { + cursor: pointer; + white-space: nowrap; + border-left: 3px solid #1d1d1d; + padding: 2px 10px 2px 30px; +} +.ce_leftnav:hover { + background-color:#2a2d2e; + border-left: 3px solid #00A4FD; +} +.ce_leftnav_highlighted { + background-color: rgba(0, 99, 153, 1) !important; +} +.ce_leftnav_keyboard_selected:before { + font-size: 20px; + content: "\25B8"; + font-family: Splunk Icons; + font-style: normal; + font-weight: 400; + text-decoration: inherit; + line-height: inherit; + position: absolute; + color: #00A4FD; + margin-left: -28px; +} +.ce_leftnav_name { + display: inline-block; + min-width: 300px; + width: 50%; + vertical-align: top; + text-overflow: ellipsis; + overflow: hidden; +} +.ce_leftnav_time { + display: inline-block; + min-width: 140px; + width: 24%; + vertical-align: top; +} +.ce_leftnav_size { + display: inline-block; + min-width: 50px; + text-align: right; + width: 16%; + vertical-align: top; + padding-right: 20px; +} +.ce_opacity06 { + opacity: 0.6; +} +.ce_tree_pane { + position: absolute; + width: 280px; + height: 100%; + background-color: #1d1d1d; +} +.ce_tree_pane .ce_spinner { + position: absolute; + left: 0; + right: 0; + transform: scale(0.75); + text-align: center; +} +.ce_tree_icons{ + max-height: 38px; + background-color: #404040; + padding-left: 4px; + overflow: hidden; + +} +.ce_tree_icons .ce_clickable_icon { + border: 2px solid #404040; + border-radius: 6px; + padding: 6px 8px 8px 6px; + margin: 4px 2px 0 2px; + text-align: center; + width: 32px; +} +.ce_tree_icons .ce_selected { + background-color: #1d1d1d; + border: 0 none; + border-top-right-radius: 8px; + border-top-left-radius: 8px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + color: white; + box-shadow: inset -6px 0 6px 0px #1d1d1d, 0 0 15px #404040, 0 0 30px #404040; +} + +.ce_tree_btn { + display: none; +} + +.ce_tree_btn_tab, .ce_tree_btn_show { + display: inline-block; +} + +.ce_icons_divider { + height: 21px; + width: 5px; + margin-right: 4px; + border-right: 1px solid #262626; + display: inline-block; + transform: translateY(5px); +} + +.ce_treenothing .icon-warning, .ce_treeempty .icon-warning { + margin-right: 8px; +} +.ce_treenothing, .ce_treeempty { + white-space: nowrap; + padding: 40px 10px 2px 22px; + text-overflow: ellipsis; + overflow: hidden; +} +.ce_treeempty{ + opacity: 0.4; + margin-left: 22px; +} +.ce_treehighlight, +.ce_treenothing_text { + color: #00A4FD; +} +.ce_link { + color: #00A4FD; + text-decoration: underline; + cursor: pointer; +} +.tooltip.in { + opacity: 0.95 +} +input[type=text].ce_treesearch_input{ + background-color: rgb(64, 64, 64); + color: white; + position: absolute; + z-index: 9; + bottom: -10px; + border: 0px none; + left: 0; + height: 28px; + display: block; + box-shadow: none; + border-radius: 0; + width: 100%; + padding-left: 13px; +} +input[type=text].ce_treesearch_input::placeholder { + color: #bfbfbf; +} +.ce_file_path { + line-height: 22px; + white-space: nowrap; + padding: 8px 10px 2px 22px; + text-overflow: ellipsis; + overflow: hidden; + color: white; +} +.ce_file_list { + color: #ccc; + position: absolute !important; + margin: 0; + padding: 0; + top: 70px; + /* overflow-x: hidden; */ + bottom: 30px; + width: 100%; +} +.ce_file_wrap { + opacity: 1; + transform: translate(0px, 0px); + padding: 4px 0; + transition: all 300ms; +} +.ce_move_fwd , .ce_move_back , .ce_move_none { + opacity: 0; +} +.ce_move_fwd { + transform: translate(-200px, 0px); +} +.ce_move_back { + transform: translate(200px, 0px); +} +.ce_rtl{ + direction:rtl; +} +.ce_file_path > bdi { + display: none; +} +.ce_file_path.ce_rtl > bdi { + display: inline; +} +.ce_file_path.ce_rtl > span { + display: none; +} +.ce_file_path .ce_right_icon { + background-color: transparent; +} +.ce_container { + position: absolute; + left: 283px; + right: 0; + top: 0; + bottom: 0; + background-color: #404040; + padding-left: 6px; +} +.ce_resize_column { + top: 0; + bottom: 0; + left: 280px; + position: absolute; + background: #404040; + width: 3px; + cursor: col-resize; + z-index: 12; +} +.ce_tabs { + height: 38px; + position: absolute; + left: 34px; + right: 0; + top: 0; + display: flex; + background-color: #404040; + color: #ddd; + padding-right: 4px; +} +.ce_home_tab { + position: absolute; + width: 34px; + line-height: 34px; + cursor: pointer; + color: #ddd; + background-color: #404040; + left: 0; + padding-left: 6px; + top: 0; + height: 40px; + margin-top: 4px; +} +.ce_app_name { + font-size: 20px; + font-weight: 200; + padding-right: 20px; +} +.ce_app_name i { + font-size: 22px; +} +.ce_app_title { + color: white; + font-size: 26px; + letter-spacing: -1px; +} +.ce_theme_vs .ce_app_title { + color: black; +} +.ce_actions_header { + font-size: 16px; + margin-top: 16px; + margin-bottom: 10px; + font-weight: bold; +} +.ce_actions_text { + margin: 0 10px 0 6px +} +.ce_custom_actions{ + margin:40px 60px 40px 0; + max-width:1200px; +} +.ce_footer_links { + margin-top:40px; +} +.ce_tagline { + font-size: 10px; + letter-spacing: 3px; + margin-bottom: 40px; + opacity: 0.3; +} +.ce_marginbottom { + margin-bottom:20px; +} + +.ce_contents_home .btn:hover { + box-shadow: inset 0 -1px 0 #3c444d; + color: #fff; + filter: none; + text-decoration: none; + text-shadow: none; + transition: background .2s, border .2s, box-shadow .2s, text-decoration .2s; +} +.ce_contents_home .btn { + background-color: #5c6773; + border: 1px solid #32414c; + border-radius: 3px; + color: #ddd; + margin: 0 5px 5px 0; + /* background-color: #5c6773; + border: 1px solid #32414c; + border-radius: 3px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #ddd; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 400; + height: auto; + line-height: 20px; + margin-bottom: 0; + padding: 5px 14px; + text-align: center; + vertical-align: middle; + white-space: nowrap; */ +} +.ce_home_buttonset { + margin-top:30px; + margin-bottom: 30px; +} +.ce_tab { + position: relative; + width: 220px; + line-height: 36px; + white-space: nowrap; + overflow: hidden; + padding: 0 2px 0 8px; + cursor: pointer; + margin-top:4px; +} +.ce_fullPathTab { + width: 300px; + direction: rtl; + padding-right: 15px; + text-align: left; +} +.ce_pipe { + position: absolute; + right: 0px; + margin-top: 6px; + height: 21px; + width: 0px; + z-index: 4; + margin-right: 0px; + border-right: 1px solid #262626; +} +.ce_pipe_left { + position: absolute; + left: 0px; + margin-top: 6px; + border-left: 1px solid #262626; + height: 21px; + width: 0px; + z-index: 4; + margin-left: 0px; +} +.ce_tab_new { + width: 30px; + position: relative; + line-height: 32px; + border-right: 1px solid black; + text-align: center; +} +.ce_tab_new > i { + padding: 4px 8px; + cursor: pointer; + color: #c3cbd4; +} +.ce-dim{ + color: #aaa; +} +.ce_tab_new > i:hover { + color: #00A4FD; +} +.ce_tab:hover { + color: white; +} +.ce_home_tab.ce_active, +.ce_tab.ce_active { + background-color: #1d1d1d; + border-top-right-radius: 8px; + border-top-left-radius: 8px; + color: white; + z-index: 9; + box-shadow: inset -6px 0 6px 0px #1d1d1d; +} +.ce_tab.ce_active { + box-shadow: inset -6px 0 6px 0px #1d1d1d, 0 0 15px #404040, 0 0 30px #404040; +} +.ce_theme_vs .ce_home_tab.ce_active, +.ce_theme_vs .ce_tab.ce_active { + background-color: #fffffe; + box-shadow: inset -6px 0 6px 0px #fffffe; + color: black; +} +.ce_theme_hc-black .ce_home_tab.ce_active, +.ce_theme_hc-black .ce_tab.ce_active { + background-color: black; + box-shadow: inset -6px 0 6px 0px black; +} +.ce_tab .ce_right_icon { + background-color: #404040; + box-shadow: 0 0 4px 4px #404040; +} +.ce_tab.ce_active .ce_right_icon { + background-color: #1d1d1d; + box-shadow: 0 0 4px 4px #1d1d1d; +} +.ce_theme_vs .ce_tab.ce_active .ce_right_icon { + background-color: #fffffe; + box-shadow: 0 0 4px 4px #fffffe; +} +.ce_clickable_icon { + cursor: pointer; + color: white; + font-size: 18px; + padding: 5px; +} +.ce_theme_vs .ce_active .ce_clickable_icon { + color: black; +} +.ce_clickable_icon.ce_disabled { + opacity: 0.5; + cursor: not-allowed; +} +.ce_clickable_icon.ce_clickable_icon.ce_clickable_icon:not(.ce_disabled):hover { + color: #00A4FD; +} +.ce_right_icon { + position: absolute; + right: 7px; + padding: 2px 5px; + font-size: 18px; + margin-top: -2px; + height: 34px; +} +.ce_restore_session { + color: #c3cbd4; + margin: 12px 30px; + cursor: pointer; + position: relative; +} +.ce_restore_session i { + font-size: 18px; + color: white; + position: absolute; + left: -20px; + top: 0px; +} +.ce_restore_session:hover i { + color: #00A4FD; +} +.ce_restore_session:hover span { + text-decoration: underline; +} +.ce_recent_list { + background-color: #2d2f31; + color: white; + position: absolute; + max-width: 600px; + max-height: 600px; + overflow: hidden; + left: 226px; + top: 50px; + list-style-type: none; + padding: 10px; + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + z-index:10; +} +.ce_recent_list li { + padding: 3px 6px 3px 9px; + margin: 1px 0 2px 0; + border-left: 3px solid transparent; +} +.ce_recent_list li.ce_selectable { + cursor: pointer; + color: #bbb; + border-left: 3px solid transparent; +} +.ce_recent_list li.ce_selectable:hover { + background-color: #262626; + border-left: 3px solid #00A4FD; +} +.ce_right_icon.ce_right_two { + right: 32px; +} +.ce_contents_home { + position:absolute; + overflow: hidden; + top: 38px; + z-index: 11; + bottom: 0; + left: 0; + right: 0; + color: #ccc; + padding: 27px 27px 0 27px; +} +.ce_theme_vs .ce_contents_home { + color: #4e4e4e; +} +.ce_contents { + top: 38px; + padding-top: 10px; + bottom: 0; + left: 0; + z-index: 11; + right: 0; + position: absolute; + background-color: #1e1e1e; +} +.ce_theme_vs .ce_contents { + background-color: #fffffe; +} +.ce_theme_hc-black .ce_contents { + background-color: black; +} +.ce_tab_container, +.ce_editor_container, +.ce_editor_sidecar_editor { + height: 100%; + margin: 6px; +} +.ce_editor_sidecar { + position: absolute; + height: 400px; + width: 600px; + border-left: 3px solid #5c5c5c; + border-right: 3px solid #5c5c5c; + bottom: 0; + right: 150px; + background-color: #1e1e1e; + opacity: 0; + /* transform: translateY(467px); */ + transition: transform 300ms; + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); +} +.ce_editor_sidecar_pin_button { + color: orange; +} +.ce_editor_sidecar_autohide_on .ce_editor_sidecar_pin_button { + color: white; +} + +.ce_theme_vs .ce_editor_sidecar { + background-color: #ffffff; +} +.ce_editor_sidecar_title { + height: 35px; + background-color: #5c5c5c; + color: white; + line-height: 35px; + padding-left: 10px; + cursor: pointer; + text-overflow: ellipsis; + padding-right: 27px; + white-space: nowrap; + overflow: hidden; +} +.ce_editor_sidecar_autohide { + height: 2px; + border-left-width: 0px; + border-left-color: transparent; + border-left-style: solid; + transition: border-left-width 5000ms; + display: none; +} +.ce_editor_sidecar_autohide_on .ce_editor_sidecar_autohide { + display: block; +} +.ce_editor_sidecar_resizer { + cursor: nw-resize; + position: absolute; + width: 20px; + height: 20px; + /*background-color: red;*/ + top: -4px; + left: -6px; +} +.ce_editor_sidecar .ce_right_icon { + margin-top: 5px; +} +.ce_editor_sidecar .ce_spinner { + margin-top: 50px; +} +.ce_contents a, +.ce_contents a:hover { + color: inherit; +} +.ce_contents p { + color: inherit; +} +.context-view.monaco-menu-container { + font-family: Splunk Platform Sans,Proxima Nova,Roboto,Droid,Helvetica Neue,Helvetica,Arial,sans-serif !important; + font-size: 14px; +} +.monaco-action-bar .actions-container { + padding: 10px 0; +} +.monaco-menu .monaco-action-bar.vertical .action-item > a, +.monaco-menu .monaco-action-bar.vertical .action-item > span { + line-height: 2; +} +.monaco-menu .monaco-action-bar.vertical { + background-color: #2d2f31 !important; +} +.monaco-menu .monaco-action-bar.vertical .action-item:not(.disabled) > a{ + background-color: inherit !important; + color: #ccc !important; +} +.monaco-menu .monaco-action-bar.vertical .action-item:not(.disabled) { + border-left: 3px solid transparent; + background-color: #2d2f31; +} +.monaco-menu .monaco-action-bar.vertical .action-item:not(.disabled):hover { + background-color: #262626; + border-left: 3px solid #00A4FD; +} +.monaco-editor .scroll-decoration{ + /* disable the scroll shadow at the top */ + box-shadow: none !important; +} +.ce_hidden { + display:none !important; +} +.ce_sort_menu_wrap { + position: absolute; + /* transition: opacity 300ms; */ + background-color: #2d2f31; + padding: 8px; + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + font-size: 13px; + color: #bbb; + z-index: 13; + line-height: 2; +} +.ce_sort_menu_wrap .ce_clickable_icon { + border: 2px solid #262626; + border-radius: 6px; + margin-right: 6px; +} +.ce_sort_menu_wrap .ce_clickable_icon:hover { + color: white; +} +.ce_sortby_selected { + border: 2px solid #00A4FD !important; + color: #00A4FD !important; +} +.ce_context_menu_overlay { + position:absolute; + background-color: rgba(0,0,0,0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 12; +} +.ce_context_menu_wrap { + position: absolute; + opacity: 0; + top: -9999px; + left: -9999px; + right: auto; + bottom: auto; + transition: opacity 300ms; + background-color: #2d2f31; + padding: 2px; + min-width: 200px; + max-width: 440px; + overflow: hidden; + text-overflow: ellipsis; + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + font-size: 13px; + color: #bbb; + white-space: nowrap; + z-index: 13; +} +.ce_context_menu_wrap > div { + margin: 2px 2px; + padding: 4px 10px; + border-left: 3px solid transparent; +} +.ce_context_menu_wrap > div:hover { + background-color: #262626; + cursor: pointer; + border-left: 3px solid #00A4FD; +} +.ce_toaster { + background-color: #53a051; + width: 232px; + height: 60px; + position: absolute; + right: 50px; + top: 80px; + line-height: 60px; + padding: 0 20px; + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + color: white; + visibility: hidden; + opacity: 0; + z-index:11; + transform: translateX(30px); + transition: all 200ms; +} +.ce_toaster i { + font-size: 50px; + position: absolute; + color: white; +} +.ce_toaster span { + margin-left: 60px; +} +.ce_toaster.ce_show { + opacity: 1; + visibility: visible; + transform: translateX(0); +} +.modal-body { + overflow: auto; +} +.modal-body .pre-no-color{ + background-color: white; + padding: 0; + border: 0 none; +} +.modal-body img{ + margin-bottom: 16px; + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + border: 1px solid #e2e2e2; + width: 700px; +} +.btn.btn-danger { + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + box-shadow:none; + background-color: #da4f49; + background-image: linear-gradient(180deg,#ee5f5b,#bd362f); + background-repeat: repeat-x; + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25); +} +.btn.btn-danger:hover { + background: #e45753; +} +.btn.btn-inverse { + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + box-shadow:none; + background-color: #4983DA; + background-image: linear-gradient(180deg,#5B65EE,#2F31BD); + background-repeat: repeat-x; + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25); +} +.btn.btn-inverse:hover { + background: #5B65EE; +} +.btn.btn-warning { + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + box-shadow:none; + background-color: #CC9622; + background-image: linear-gradient(180deg,#E4A827,#CC9622); + background-repeat: repeat-x; + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25); +} +.btn.btn-warning:hover { + background: #E7B13B; +} +.btn-info { + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + box-shadow:none; + background-color: #49afcd; + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); +} +.btn-info:hover { + color: #fff; + background: #2f96b4; +} +.btn.btn-disabled { + cursor: not-allowed; + opacity: 0.5; +} +.ceRedLine { + border-left: 8px solid rgba(255,0,0,0.75); +} +.ceGreeenLine { + border-left: 8px solid green; +} +.ceDimGreeenLine { + border-left: 8px solid rgba(0,128,0,0.5); +} +.ceOrangeLine { + border-left: 8px solid orange; +} +.ceBlueLine { + border-left: 8px solid #676767; +} +.ce_diff_addition { background-color: rgba(0,255,0,.2); } +.ce_diff_deletion { background-color: rgba(255,0,0,.2); } +.green {color: #65a637} +.red { color: #d6563c;} +.nobr { + white-space: nowrap; +} +.ar { + text-align:right; +} +.ce_changelog { + padding: 10px; + width: 100%; + color: #d4d4d4; + height: 100%; + overflow-x: auto; +} +.ce_changelog table { + width: 100%; +} +.ce_changelog tr:nth-child(even) { + background: rgba(0, 0, 0, 0.2); +} +.ce_changelog td{ + padding: 4px 12px; +} +.ce_changelog_buttons { + width: 50px; + display: inline-block; +} +.ce_changelog_filescol { + width: 90%; +} +.ce_file_history { + width: 100%; + color: #d4d4d4; + padding: 0 10px 0 30px; + height: 100%; + overflow-x: auto; +} +.ce_file_history h1 { + margin-top:50px; + color: white; +} +.ce_file_history h1::first-letter { + text-transform: uppercase; +} +.ce_file_history h1 span { + font-size: 16px; +} +.ce_file_history p{ + font-family: Consolas, "Courier New", monospace; + font-weight: normal; + font-size: 14px; + line-height: 19px; + letter-spacing: 0px; + margin:0; + position:relative; +} +.ce_diff_change p { + padding-left: 20px; +} +.ce_diff_addition:before { + content: "+"; + position: absolute; + margin-left: -15px; + margin-top: -1px; +} +.ce_diff_deletion:before { + content: "-"; + position: absolute; + margin-left: -15px; + margin-top: -1px; +} +.ce_diff_change { + margin: 6px 0 40px 0; + padding: 6px; + background-color: rgba(0, 0, 0, 0.2); +} +.ce_gitoutput { + padding: 20px; + color: #d4d4d4; + overflow-x: auto; + height: 100%; +} +.ce_gitoutput h2 { + color: #dd6a6f; +} +.ce_pre, +.ce_gitoutput-out, +.ce_gitoutput-cmd { + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + font-family: Consolas, "Courier New", monospace; + font-weight: normal; + font-size: 14px; + line-height: 19px; + letter-spacing: 0px; + background-color: #262626; + padding: 10px; +} +.ce_pre { + color: #ccc; + background-color: inherit; + border: 0 none; +} +.ce_theme_vs .ce_pre { + color: inherit; +} +.ce_gitoutput-cmd { + color: #569cd6; +} +.ce_gitoutput-desc { + color: #608b4e; + margin-top: 20px; + line-height: 32px; + font-weight: bold; + font-size: 16px; +} +/* http://tobiasahlin.com/spinkit/ */ +html .ce_spinner { + margin-top: 140px; +} +.spinner { + margin: 100px auto 0; + width: 70px; + text-align: center; +} +.spinner > div { + width: 18px; + height: 18px; + background-color: #00A4FD; + + border-radius: 100%; + display: inline-block; + -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; + animation: sk-bouncedelay 1.4s infinite ease-in-out both; +} +.spinner .bounce1 { + -webkit-animation-delay: -0.32s; + animation-delay: -0.32s; +} +.spinner .bounce2 { + -webkit-animation-delay: -0.16s; + animation-delay: -0.16s; +} +@-webkit-keyframes sk-bouncedelay { + 0%, 80%, 100% { -webkit-transform: scale(0) } + 40% { -webkit-transform: scale(1.0) } +} +@keyframes sk-bouncedelay { + 0%, 80%, 100% { + -webkit-transform: scale(0); + transform: scale(0); + } 40% { + -webkit-transform: scale(1.0); + transform: scale(1.0); + } +} +input.ce_file_upload_extract[type=checkbox] { + transform: translateY(-3px); + margin-right: 8px; +} +input.ce_run_cwd_radio[type=radio] { + margin: 0 10px; +} +.ce_disclaimer { + font-size: 10px; +} +.ce_fs_slow_message{ + margin-top: 200px; + text-align: center; +} +.ce_fs_slow_message > div{ + margin-bottom: 10px; +} +.ce_pref_label { + display: inline-block; + margin-left: 20px; + transform: translateY(-2px); +} +.ce_pref_advanced { + width: 100%; + height: 174px; +} +.ce_postsave_arg1 { + margin-left:6px; + width:630px; +} +.ce_postsave_strmatch_bad, +.ce_postsave_strmatch_good { + margin-left:6px; + width:150px; +} +.ce_postsave_background { + width: 60px; +} +.ce_postsave_suggestion { + color:#333; + cursor:pointer; +} +.monaco-editor .monaco-editor-hover code { + color: inherit; + background-color: inherit; + border: 0 none; +} +.ce-server-classes a, +.ce-server-classes-all, +.ce-debugrefresh-endpoints a { + margin: 10px 12px 0 0; + background-color: #f7f8fa; + padding: 6px 10px; + display: inline-block; + border-radius: 3px; +} +.ce-server-classes a:hover, +.ce-server-classes-all:hover, +.ce-debugrefresh-endpoints a:hover { + background-color: #ebeeef; +} \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/config.js b/apps/config_explorer/appserver/static/config.js new file mode 100755 index 00000000..ad190332 --- /dev/null +++ b/apps/config_explorer/appserver/static/config.js @@ -0,0 +1,4490 @@ +// Copyright (C) 2018 Chris Younger + +/* jslint bitwise: true */ +/* globals require, monaco, BroadcastChannel, Promise */ + +/* + +TODO + - Option to open a blank diffing window + - ability to stream results from a run window + - ability to see running config explorer commands and kill them? + - if you hit save when a post-save action is already running, two things run at once. Seems its not too bad anyway. + - the sidecar should allow rerun + +*/ +// Loading monaco from the CDN +/* +require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.0/min/vs' }}); +window.MonacoEnvironment = { + getWorkerUrl: function(workerId, label) { + return `data:text/javascript;charset=utf-8,${encodeURIComponent(` + self.MonacoEnvironment = { baseUrl: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.0/min/' }; + importScripts('https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.15.0/min/vs/base/worker/workerMain.js');` + )}`; + } +}*/ + +// The splunk webserver prepends all scripts with a call to i18n_register() for internationalisation. This fails for web-workers becuase they dont know about this function yet. +// The options are patch the function on-the-fly like so, or to edit the file on the filesystem (which makes upgrading monaco harder) +(function() { + var mode = "min"; // or dev + require.config({ + paths: { + 'vs': '../app/config_explorer/node_modules/monaco-editor/'+mode+'/vs', + } + }); + window.MonacoEnvironment = { + getWorkerUrl: function(workerId, label) { + return "data:text/javascript;charset=utf-8," + encodeURIComponent( + //"console.log('shimming i18n_register for worker'); "+ + "function i18n_register(){/*console.log('i18n_register shimmed');*/} "+ + "self.MonacoEnvironment = { baseUrl: '" + window.location.origin + "/static/app/config_explorer/node_modules/monaco-editor/"+mode+"/' }; "+ + "importScripts('" + window.location.origin + "/static/app/config_explorer/node_modules/monaco-editor/"+mode+"/vs/base/worker/workerMain.js');" + ); + } + }; +})(); + +require([ + "splunkjs/mvc", + "jquery", + "vs/editor/editor.main", + "app/config_explorer/sortable.min", + "app/config_explorer/OverlayScrollbars" +], function( + mvc, + $, + wat, + Sortable, + OverlayScrollbars +) { + + // Inject all the HTML contents + $(".dashboard-body").html( + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + //""+ + ""+ + ""+ + ""+ + ""+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + ""+ + "
"+ + "
"+ + "
"+ + "
"+ + ""+ + "
"+ + "
"+ + "
"+ + "
"+ + ""+ + "
Config Explorer for
"+ + "
by Chris Younger
"+ + "
"+ + "Settings Theme: "+ + "light"+ + "dark"+ + "high contrast"+ + "Change log"+ + "
"+ + "
"+ + ""+ + "
"+ + "
"+ + "
"+ + "
Saved
"+ + "
"+ + "
"+ + ""); + + // Mapping of all the tab types + // can_rerun - has a right click open in the editor for "rerun". This will close and reopen the tab. If this is "true" it must also exist in the hooksCfg list with the same name! + // reopen - tracked through hash and in "recent files". If this is "true" it must also exist in the hooksCfg list with the same name! + var tabCfg = { + 'btool': { can_rerun: true, can_reopen: true, }, + 'btool-hidepaths': { can_rerun: true, can_reopen: true, }, + 'btool-hidedefaults': { can_rerun: true, can_reopen: true, }, + 'btool-hidesystemdefaults': { can_rerun: true, can_reopen: true, }, + 'btool-check': { can_rerun: true, can_reopen: false, }, + 'spec': { can_rerun: false, can_reopen: true, }, + 'run': { can_rerun: true, can_reopen: false, }, + 'deployserver': { can_rerun: true, can_reopen: false, }, + 'read': { can_rerun: false, can_reopen: true, }, + 'settings': { can_rerun: false, can_reopen: false, }, + 'change-log': { can_rerun: false, can_reopen: false, }, + 'diff': { can_rerun: false, can_reopen: false, }, + 'history': { can_rerun: false, can_reopen: false, }, + 'git': { can_rerun: false, can_reopen: false, }, + 'live': { can_rerun: false, can_reopen: false, }, + 'live-diff': { can_rerun: false, can_reopen: false, }, + 'refresh': { can_rerun: true, can_reopen: false, }, + 'internal': { can_rerun: false, can_reopen: false, }, + 'rest': { can_rerun: false, can_reopen: true, }, + }; + // This is what will be executed in the following circumstances: + // - the URL hash on load (can_reopen=true above) + // - opening from the Recent file list (can_reopen=true above) + // - Editor>RightClick>Rerun option is chosen (can_rerun=true above) + // - custom [hook:] right-click option + var hooksCfg = { + 'btool': function(arg1, arg2, embeddedMode){ + runBToolList(arg1, 'btool'); + }, + 'btool-hidepaths': function(arg1, arg2, embeddedMode){ + runBToolList(arg1, 'btool-hidepaths'); + }, + 'btool-hidedefaults':function(arg1, arg2, embeddedMode){ + runBToolList(arg1, 'btool-hidedefaults'); + }, + 'btool-hidesystemdefaults':function(arg1, arg2, embeddedMode){ + runBToolList(arg1, 'btool-hidesystemdefaults'); + }, + 'btool-check': function(arg1, arg2, embeddedMode){ + runBToolCheck(); + }, + 'spec': function(arg1, arg2, embeddedMode){ + displaySpecFile(arg1); + }, + 'run': function(arg1, arg2, embeddedMode){ + runShellCommandNow(arg1, arg2, embeddedMode); + }, + 'run-safe': function(arg1, arg2, embeddedMode){ + runShellCommand(arg1, true); + }, + 'deployserver': function(arg1, arg2, embeddedMode){ + runReloadDeployServer(arg1); + }, + 'read': function(arg1, arg2, embeddedMode){ + readFile(arg1); + }, + 'live': function(arg1, arg2, embeddedMode){ + runningVsLayered(arg1, false); + }, + 'live-diff': function(arg1, arg2, embeddedMode){ + runningVsLayered(arg1, true); + }, + 'bump': function(arg1, arg2, embeddedMode){ + debugRefreshBumpHook("bump", embeddedMode); + }, + 'refresh': function(arg1, arg2, embeddedMode){ + debugRefreshBumpHook(arg1, embeddedMode); + }, + 'cd': function(arg1, arg2, embeddedMode){ + changeDirectory(arg1); + }, + 'clipboard': function(arg1, arg2, embeddedMode){ + copyTextToClipboard(arg1); + }, + 'rest': function(arg1, arg2, embeddedMode){ + readFileRest(arg1); + }, + 'openurl': function(arg1, arg2, embeddedMode){ + // set the target to the base64 representation of the URL so we can keep opening in the same tab for the same url + window.open(arg1, btoa(arg1)); + } + }; + // globals + var debug_gutters = false; + var service = mvc.createService({owner: "nobody"}); + //var username = Splunk.util.getConfigValue("USERNAME"); + var editors = []; + var inFolder = (localStorage.getItem('ce_current_path') || './etc/apps'); + var inFolderRestApp = (localStorage.getItem('ce_current_path_restapp') || ''); + var inFolderRestType = "views"; + var regex_file_path_to_dashboard_parts = /.*\/(apps|users\/[^\/]+)\/([^\/]+)\/(?:local|default)\/data\/ui\/views\/(.*)\.xml$/; + var openingFolder; + var folderContents; + var run_history = (JSON.parse(localStorage.getItem('ce_run_history')) || []); + var closed_tabs = (JSON.parse(localStorage.getItem('ce_closed_tabs')) || []); + var preferences = getPreferences(); + var activeTab = -1; + var filecache = {}; + var conf = {}; + var confFiles = {}; + var confFilesSorted = []; + var inFlightRequests = 0; + var comparisonLeftFile = null; + var tabid = 0; + var leftpane_ignore = false; + var max_recent_files_show = 50; + var hooksActive = []; + var tabCreationCount = 0; + var approvedPostSaveHooks = {}; + var fileModsCheckTimer; + var fileModsCheckTimerPeriod = 10000; + var fileModsCheckTimerInProgress = false; + var sortMode = "name"; + var sortAsc = true; + var treeSearchFocus = false; + var sortModeRest = (localStorage.getItem('ce_sort_mode_rest') || 'label'); + var sortAscRest = (localStorage.getItem('ce_sort_asc_rest') || '1'); + var displayModeRest = (localStorage.getItem('ce_display_mode_rest') || 'ln'); + var doLineHighlight = ""; + var $dashboard_body = $('.dashboard-body'); + var $ce_tree_pane = $(".ce_tree_pane"); + var $ce_container = $('.ce_container'); + var $ce_resize_column = $('.ce_resize_column'); + var $ce_file_list = $(".ce_file_list"); + var $ce_file_wrap = $(".ce_file_wrap"); + var $ce_file_path = $(".ce_file_path"); + var $ce_tree_icons = $(".ce_tree_icons"); + var $ce_contents = $(".ce_contents"); + var $ce_contents_home = $(".ce_contents_home"); + var $ce_spinner = $(".ce_spinner"); + var $ce_tabs = $(".ce_tabs"); + var $ce_home_tab = $(".ce_home_tab"); + var $ce_context_menu_overlay = $(".ce_context_menu_overlay"); + var broadcastChannel = new BroadcastChannel("config_explorer"); + broadcastChannel.onmessage = handleBroadcastMessage; + + // Set the "save" hotkey at a global level instead of on the editor, this way the editor doesnt need to have focus. + $(window).on('keydown', function(event) { + // CTRL-SHIFT-/ focus the bottom left filter. can use just forward slash if nothing is currently focused. + if (((event.ctrlKey || event.metaKey) && event.shiftKey && event.which===191) || (event.which===191 && document.activeElement.tagName === "BODY")) { + // if the editor is focused, then the keydown event wont bubble up to the window + $(".ce_treesearch_input").focus(); + } + // CTRL-S to save active tab + if ((event.ctrlKey || event.metaKey) && event.which===83) { + event.preventDefault(); + saveActiveTab(); + } + + // Prevent people from navigating away when they have unsaved changes + }).on("beforeunload", function() { + for (var i = 0; i < editors.length; i++) { + if (editors[i].hasChanges) { + return "Unsaved changes will be lost."; + } + } + }); + + function setLeftPathWidth(size) { + size = Math.min(Math.max(size, 0), $(window).width() * 0.8); + $ce_tree_pane.css("width", size + "px"); + $ce_resize_column.css("left", size + "px"); + $ce_container.css("left", (size + 3) + "px"); + filePathRTLCheck(); + } + + // Handler for resizing the tree pane/editor divider + $ce_resize_column.on("mousedown", function(e) { + e.preventDefault(); + $(document).on("mousemove.colresize", function(e) { + setLeftPathWidth(e.pageX); + localStorage.setItem('ce_lwidth', e.pageX); + }); + }); + + $(document).on("mouseup",function(e) { + $(document).off('mousemove.colresize'); + }); + + $('.ce_app_errors').on('click', function(){ + runBToolCheck(); + }); + $('.ce_app_settings').on('click', function(){ + readFile(""); + }); + $(".ce_theme").on('click', function(){ + setThemeMode($(this).attr("data-theme")); + }); + $('.ce_app_changelog .btn').on('click', function(){ + showChangeLog(); + }); + $(".ce_splunk_reload").on("click", function(){ + debugRefreshBumpHook( $(this).attr("data-endpoint") ); + }); + $(".ce_splunk_reload_specific").on("click", function(){ + debugRefreshEndpointSelection(); + }); + $ce_home_tab.on("click", function(){ + activateTab(-1); + }); + + // Click handlers for New File/New Folder buttons + $ce_tree_icons.on("click", "i", function(e){ + e.stopPropagation(); + var elem = $(this); + var $menu; + if (elem.hasClass("ce_disabled")) { + return; + } + + if (elem.hasClass("ce_upload_file")) { + fileSystemUpload(inFolder); + } else if (elem.hasClass("ce_refresh_tree")) { + refreshFolder(); + } else if (elem.hasClass("ce_refresh_tree_rest")) { + delete restTypes.views.cache; + delete restTypes.apps.cache; + leftPaneRestList(); + } else if (elem.hasClass("ce_folder_up")) { + readFolder(inFolder.replace(/[\/\\][^\/\\]*$/,''), 'back'); + } else if (elem.hasClass("ce_folder_up_rest")) { + if (inFolderRestApp !== "") { + inFolderRestApp = ""; + } else { + inFolderRestType = ""; + } + leftPaneRestList(); + +// TODO [low] it should remember which file system tab you are on + } else if (elem.hasClass("ce_show_filesystem")) { + if (! elem.hasClass("ce_selected")) { + filterModeReset(); + $ce_tree_icons.find(".ce_clickable_icon").removeClass("ce_selected ce_tree_btn_show"); + elem.addClass("ce_selected"); + $(".ce_folder_up, .ce_refresh_tree, .ce_filter, .ce_add_folder, .ce_app_run, .ce_upload_file, .ce_sort_files").addClass("ce_tree_btn_show"); + leftPaneFileList(); + } + } else if (elem.hasClass("ce_recent_files")) { + if (! elem.hasClass("ce_selected")) { + filterModeReset(); + $ce_tree_icons.find(".ce_clickable_icon").removeClass("ce_selected ce_tree_btn_show"); + elem.addClass("ce_selected"); + leftPaneRecentList(); + } + } else if (elem.hasClass("ce_show_confs")) { + if (! elem.hasClass("ce_selected")) { + filterModeReset(); + $ce_tree_icons.find(".ce_clickable_icon").removeClass("ce_selected ce_tree_btn_show"); + elem.addClass("ce_selected"); + leftPaneConfList(); + } + } else if (elem.hasClass("ce_show_rest")) { + if (! elem.hasClass("ce_selected")) { + filterModeReset(); + $ce_tree_icons.find(".ce_clickable_icon").removeClass("ce_selected ce_tree_btn_show"); + elem.addClass("ce_selected"); + $(".ce_folder_up_rest, .ce_refresh_tree_rest, .ce_sort_files_rest").addClass("ce_tree_btn_show"); + leftPaneRestList(); + } + + } else if (elem.hasClass('ce_app_run')) { + runShellCommand(); + } else if (elem.hasClass('ce_sort_files')) { + $menu = $("
Sort by:"+ + "
Name
"+ + "
Size
"+ + "
Modified date
").appendTo($dashboard_body); + $menu.find(".ce_sortby_" + sortMode + "." + (sortAsc ? 'icon-chevron-down' : 'icon-chevron-up')).addClass("ce_sortby_selected"); + $menu.css({right: $(window).width() - parseInt($ce_tree_pane.css("width")) + 2, top: 41}); + $menu.on("click", ".ce_clickable_icon", function(){ + var $t = $(this); + sortMode = $t.hasClass("ce_sortby_name") ? "name" : $t.hasClass("ce_sortby_size") ? "size" : "time"; + sortAsc = !!($t.hasClass("icon-chevron-down")); + readFolderLoad(inFolder); + }); + $ce_context_menu_overlay.removeClass("ce_hidden"); + $(document).one("click contextmenu", function(e2) { + $ce_context_menu_overlay.addClass("ce_hidden"); + $menu.remove(); + e2.preventDefault(); + }); + } else if (elem.hasClass('ce_sort_files_rest')) { + $menu = $("
Display:
"+ + "
Title (URL)
"+ + "
URL (Title)
"+ + "
Title
"+ + "
URL
"+ + "
Sort by:
"+ + "
Label
"+ + "
Last updated
").appendTo($dashboard_body); + $menu.find(".ce_sortby_" + sortModeRest + "." + (sortAscRest==="1" ? 'icon-chevron-down' : 'icon-chevron-up')).addClass("ce_sortby_selected"); + $menu.find(".ce_display_" + displayModeRest).addClass("ce_sortby_selected"); + $menu.css({right: $(window).width() - parseInt($ce_tree_pane.css("width")) + 2, top: 41}); + $menu.on("click", ".ce_clickable_icon", function(){ + var $t = $(this); + if ($t.hasClass("icon-string")) { + displayModeRest = $t.hasClass("ce_display_ln") ? "ln" : $t.hasClass("ce_display_nl") ? "nl" : $t.hasClass("ce_display_l") ? "l" : "n"; + localStorage.setItem('ce_display_mode_rest', displayModeRest); + } else { + sortModeRest = $t.hasClass("ce_sortby_name") ? "name" : $t.hasClass("ce_sortby_label") ? "label" : "time"; + sortAscRest = $t.hasClass("icon-chevron-down") ? "1" : "0"; + localStorage.setItem('ce_sort_mode_rest', sortModeRest); + localStorage.setItem('ce_sort_asc_rest', sortAscRest); + } + leftPaneRestList(); + }); + $ce_context_menu_overlay.removeClass("ce_hidden"); + $(document).one("click contextmenu", function(e2) { + $ce_context_menu_overlay.addClass("ce_hidden"); + $menu.remove(); + e2.preventDefault(); + }); + } + }); + + $('.ce_treesearch_input').on("input", function(){ + if ($(".ce_tree_icons .ce_show_filesystem.ce_selected").length) { + leftPaneFileList($(this).val().toLowerCase()); + } + if ($(".ce_tree_icons .ce_recent_files.ce_selected").length) { + leftPaneRecentList($(this).val().toLowerCase()); + } + if ($(".ce_tree_icons .ce_show_confs.ce_selected").length) { + leftPaneConfList($(this).val().toLowerCase()); + } + if ($(".ce_tree_icons .ce_show_rest.ce_selected").length) { + leftPaneRestList($(this).val().toLowerCase()); + } + }).on("focus", function(e){ + if ($(".ce_leftnav_keyboard_selected").length == 0) { + $ce_file_wrap.children(".ce_leftnav").first().addClass("ce_leftnav_keyboard_selected"); + } + treeSearchFocus = true; + }).on("blur", function(e){ + $(".ce_leftnav_keyboard_selected").removeClass("ce_leftnav_keyboard_selected"); + treeSearchFocus = false; + }).on("keydown", function(e){ + // select the top item + var $keyFocused = $(".ce_leftnav_keyboard_selected"); + if (e.which === 13) { + $keyFocused.click(); + } else if (e.which === 38) { // up + e.preventDefault(); + if ($keyFocused && $keyFocused.index() > 0) { + $keyFocused.prev().addClass("ce_leftnav_keyboard_selected"); + $keyFocused.removeClass("ce_leftnav_keyboard_selected"); + } + } else if (e.which === 40) { // down + e.preventDefault(); + if ($keyFocused && $keyFocused.index() < $keyFocused.parent().children().length - 1) { + $keyFocused.next().addClass("ce_leftnav_keyboard_selected"); + $keyFocused.removeClass("ce_leftnav_keyboard_selected"); + } + + // If user hits backspace with nothing in box then navigate back + } else if (e.which === 8 && $(this).val() === "" && $(".ce_tree_icons .ce_show_filesystem.ce_selected").length) { + // navigate back + $(".ce_folder_up").click(); + } else if (e.which === 8 && $(this).val() === "" && $(".ce_tree_icons .ce_show_rest.ce_selected").length) { + // navigate back + $(".ce_folder_up_rest").click(); + } + }); + + + function filterModeReset(){ + $(".ce_treesearch_input").val(""); + } + + function addHookActionToTree(hook, file, actions, matchtype) { + if (hook._match.test(file) && hook.matchtype == matchtype && ! (hook.hasOwnProperty("showInPane") && hook.showInPane === "editor")) { + actions.push($("
").text(replaceTokens(hook.label, file)).on("click", function(){ + runAction(hook.action, file, false); + })); + } + } + + // add folder hooks to the path display at the top of the left pane + $ce_file_path.on("contextmenu", function (e) { + // only allow right clicking on the "path" when in filesystem mode + if ($(".ce_tree_icons .ce_show_filesystem.ce_selected").length) { + var actions = []; + for (var j = 0; j < hooksActive.length; j++) { + addHookActionToTree(hooksActive[j], inFolder, actions, "folder"); + } + // todo check: git_autocommit is working or not + if (confIsTrue('git_autocommit', false) && conf.git_autocommit_work_tree === "") { + actions.push($("
Show change log
").on("click", function(){ + showChangeLog(); + })); + } + buildLeftContextMenu(actions, e); + } + }); + + // Click handler for left pane items + $ce_file_list.on("click", ".ce_leftnav", function(){ + var elem = $(this); + // click on a conf file + if (elem.hasClass("ce_conf")) { + runBToolList($(this).attr('file'), 'btool'); + // click on file + } else if (elem.hasClass("ce_is_report")) { + readFile(elem.attr('file')); + // recent files list + } else if (elem.hasClass("ce_leftnav_reopen")) { + hooksCfg[elem.attr('type')](elem.attr('file')); + // rest app + } else if (elem.hasClass("ce_leftnav_restapp")) { + inFolderRestApp = elem.attr('restapp'); + leftPaneRestList(); + // rest type + } else if (elem.hasClass("ce_leftnav_resttype")) { + inFolderRestType = elem.attr('resttype'); + leftPaneRestList(); + // rest file + } else if (elem.hasClass("ce_leftnav_restfile")) { + readFileRest(elem.attr('restfile')); + // Folder + } else { + if (! leftpane_ignore) { + readFolder(elem.attr('file'), 'fwd'); + } + } + // Right click menu for left pane + }).on("contextmenu", ".ce_leftnav", function (e) { + var $leftnavElem = $(this); + var isFile = $leftnavElem.hasClass("ce_is_report"); + var thisFile = $leftnavElem.attr('file'); + var actions = []; + var j; + if (isFile) { + // Add the custom hook actions + for (j = 0; j < hooksActive.length; j++) { + addHookActionToTree(hooksActive[j], thisFile, actions, "file"); + } + // gate behind flag + if (confIsTrue('dashboard_xml_file_experimental_actions', false)) { + var file_parts_for_openurl = thisFile.match(regex_file_path_to_dashboard_parts); + if (file_parts_for_openurl) { + actions.push($("
Attempt view in browser
").on("click", function(){ + hooksCfg.openurl("/app/" + file_parts_for_openurl[2] + "/" + file_parts_for_openurl[3]); + })); + actions.push($("
Attempt edit via REST API
").on("click", function(){ + if (file_parts_for_openurl[1]=="apps") { + hooksCfg.rest("/servicesNS/nobody/" + file_parts_for_openurl[2] + "/data/ui/views/" + file_parts_for_openurl[3]); + } else { + hooksCfg.rest("/servicesNS/" + file_parts_for_openurl[1].substr(6) + "/" + file_parts_for_openurl[2] + "/data/ui/views/" + file_parts_for_openurl[3]); + } + })); + + + } + } + } + if ($leftnavElem.hasClass("ce_is_folder")) { + for (j = 0; j < hooksActive.length; j++) { + addHookActionToTree(hooksActive[j], thisFile, actions, "folder"); + } + } + if ($leftnavElem.hasClass("ce_leftnav_editable") && confIsTrue('write_access', false)) { + // can rename, can trash + actions.push($("
Rename
").on("click", function(){ + fileSystemRename(thisFile); + })); + actions.push($("
Delete
").on("click", function(){ + filesystemDelete(thisFile); + })); + + } + if ($leftnavElem.hasClass("ce_conf")) { + for (j = 0; j < hooksActive.length; j++) { + addHookActionToTree(hooksActive[j], thisFile, actions, "conf"); + } + actions.push($("
Show btool (hide paths)
").on("click", function(){ + runBToolList(thisFile, 'btool-hidepaths'); + })); + actions.push($("
Show btool (hide all defaults)
").on("click", function(){ + runBToolList(thisFile, 'btool-hidedefaults'); + })); + actions.push($("
Show btool (hide system defaults)
").on("click", function(){ + runBToolList(thisFile, 'btool-hidesystemdefaults'); + })); + + if (conf.btool_dir_for_master_apps) { + actions.push($("
[master-apps] Show btool
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_master_apps, 'btool', conf.btool_dir_for_master_apps, "/splunk/etc/master-apps/"); + })); + actions.push($("
[master-apps] Show btool (hide all defaults)
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_master_apps, 'btool-hidedefaults', conf.btool_dir_for_master_apps, "/splunk/etc/master-apps/"); + })); + } + if (conf.btool_dir_for_manager_apps) { + actions.push($("
[manager-apps] Show btool
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_manager_apps, 'btool', conf.btool_dir_for_manager_apps, "/splunk/etc/manager-apps/"); + })); + actions.push($("
[manager-apps] Show btool (hide all defaults)
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_manager_apps, 'btool-hidedefaults', conf.btool_dir_for_manager_apps, "/splunk/etc/manager-apps/"); + })); + } + if (conf.btool_dir_for_deployment_apps) { + actions.push($("
[deployment-apps] Show btool
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_deployment_apps, 'btool', conf.btool_dir_for_deployment_apps, "/splunk/etc/deployment-apps/"); + })); + actions.push($("
[deployment-apps] Show btool (hide all defaults)
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_deployment_apps, 'btool-hidedefaults', conf.btool_dir_for_deployment_apps, "/splunk/etc/deployment-apps/"); + })); + } + if (conf.btool_dir_for_shcluster_apps) { + actions.push($("
[shcluster-apps] Show btool
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_shcluster_apps, 'btool'); + })); + actions.push($("
[shcluster-apps] Show btool (hide all defaults)
").on("click", function(){ + runBToolList(thisFile + ":" + conf.btool_dir_for_shcluster_apps, 'btool-hidedefaults'); + })); + } + + actions.push($("
Show .spec file
").on("click", function(){ + displaySpecFile(thisFile); + })); + actions.push($("
Show live (running) config
").on("click", function(){ + runningVsLayered(thisFile, false); + })); + actions.push($("
Compare live config against btool output
").on("click", function(){ + runningVsLayered(thisFile, true); + })); + } + + if (isFile) { + if (confIsTrue('git_autocommit', false)) { + // can show history + actions.push($("
View file history
").on("click", function(){ + getFileHistory(thisFile, inFolder); + })); + } + // download file + actions.push($("
Download
").on("click", function(){ + serverAction({action: 'filedownload', path: inFolder, param1: thisFile}).then(function(b64data){ + var byteCharacters = atob(b64data); + var byteArrays = []; + for (var offset = 0; offset < byteCharacters.length; offset += 512) { + var slice = byteCharacters.slice(offset, offset + 512); + var byteNumbers = new Array(slice.length); + for (var i = 0; i < slice.length; i++) { + byteNumbers[i] = slice.charCodeAt(i); + } + var byteArray = new Uint8Array(byteNumbers); + byteArrays.push(byteArray); + } + var blob = new Blob(byteArrays, {type: "application/octet-stream"}); + var filename = dodgyBasename(thisFile); + if (typeof window.navigator.msSaveBlob !== 'undefined') { + // IE workaround for "HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed." + window.navigator.msSaveBlob(blob, filename); + } else { + var URL = window.URL || window.webkitURL; + var downloadUrl = URL.createObjectURL(blob); + // use HTML5 a[download] attribute to specify filename + var a = document.createElement("a"); + // safari doesn't support this yet + if (typeof a.download === 'undefined') { + window.location = downloadUrl; + } else { + a.href = downloadUrl; + a.download = filename; + document.body.appendChild(a); + a.click(); + } + setTimeout(function () { URL.revokeObjectURL(downloadUrl); }, 100); // cleanup + } + }); + })); + // can compare + actions.push($("
Mark for comparison
").on("click", function(){ + comparisonLeftFile = thisFile; + })); + if (comparisonLeftFile && comparisonLeftFile !== thisFile) { + actions.push($("
Compare to " + htmlEncode(dodgyBasename(comparisonLeftFile)) + "
").on("click", function(){ + compareFiles(thisFile, comparisonLeftFile); + })); + } + } + + if ($leftnavElem.hasClass("ce_leftnav_restfile")) { + var file_parts_for_openurl_rest = $leftnavElem.attr('restfile').match(/([^\/]+)\/data\/ui\/views\/(.*)$/); + if (file_parts_for_openurl_rest) { + actions.push($("
Attempt view in browser
").on("click", function(){ + hooksCfg.openurl("/app/" + file_parts_for_openurl_rest[1] + "/" + file_parts_for_openurl_rest[2]); + })); + } + } + + if (actions.length) { + buildLeftContextMenu(actions, e, $leftnavElem); + } + }); + + // Event handlers for the editor tabs + $ce_tabs.on("click", ".ce_close_tab", function(e){ + e.stopPropagation(); + closeTabWithConfirmation($(this).parent().index()); + + // Middle click to close tab + }).on("auxclick", ".ce_tab", function(e){ + if (e.which !== 3) { + e.stopPropagation(); + closeTabWithConfirmation($(this).index()); + } + // Clicking tab + }).on("click", ".ce_tab", function(){ + activateTab($(this).index()); + + // On hover show the cross + }).on("mouseenter", ".ce_tab", function(){ + $(this).append(""); + + }).on("mouseleave", ".ce_tab", function(){ + $(this).find('.ce_close_tab').remove(); + }); + + function buildLeftContextMenu(actions, e, $t) { + e.preventDefault(); // To prevent the default context menu. + if (! actions.length) { + return; + } + e.stopPropagation(); + var $menu = $(".ce_context_menu_wrap"); + $menu.empty().append(actions); + $(".ce_leftnav_highlighted").removeClass("ce_leftnav_highlighted"); + if ($t) { + $t.addClass("ce_leftnav_highlighted"); + } + var windowHeight = $(window).height(); + if((e.clientY + 200) > windowHeight) { + $menu.css({opacity:1, left:30 + e.clientX, bottom:$(window).height()-e.clientY, right:"auto", top:"auto"}); + } else { + $menu.css({opacity:1, left:30 + e.clientX, bottom:"auto", right:"auto", top: e.clientY - 30}); + } + $ce_context_menu_overlay.removeClass("ce_hidden"); + $(document).one("click contextmenu", function(e2) { + $menu.removeAttr("style"); + $ce_context_menu_overlay.addClass("ce_hidden"); + if ($t) { + $t.removeClass("ce_leftnav_highlighted"); + } + e2.preventDefault(); + }); + } + + function compareFiles(rightFile, leftFile) { + var ecfg = createTab('diff', rightFile + " " + leftFile, "diff: " + rightFile + " " + leftFile); + ecfg.diffFileRight = rightFile; + ecfg.diffFileLeft = leftFile; + // get both files + Promise.all([ + serverActionWithoutFlicker({action: 'read', path: leftFile}), + serverActionWithoutFlicker({action: 'read', path: rightFile}), + ]).then(function(contents){ + updateTabAsDiffer(ecfg, leftFile + "\n" + contents[0], rightFile + "\n" + contents[1]); + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + + function debugRefreshBumpHook(endpoint, embeddedMode){ + // get localisation url + var url = "/" + document.location.pathname.split("/")[1] + "/"; + var label = ""; + var ecfg; + if (typeof embeddedMode === "undefined") { + embeddedMode = false; + } + if (endpoint && endpoint === "?") { + debugRefreshEndpointSelection(); + return; + } + if (endpoint && endpoint !== "all") { + if (endpoint === "bump") { + url += "_bump"; + label = "bump"; + } else { + url += "debug/refresh?entity=" + endpoint; + label = "debug/refresh: " + endpoint; + } + } else { + label = "debug/refresh: all"; + url += "debug/refresh"; + endpoint = "all"; + } + if (embeddedMode) { + ecfg = createTabSidecar(label); + } else { + // Load as a stand alone tab + ecfg = createTab('refresh', endpoint, label); + } + + $.post(url, function(data){ + if (endpoint === "bump") { + data = $('
').html(data).text(); + } else { + data = data.replace(/'''[\s\S]*'''/,""); + } + if (embeddedMode) { + updateSidecarAsEditor(ecfg, data); + } else { + updateTabAsEditor(ecfg, data, 'plaintext'); + } + + }).fail(function(jqXHR, textStatus, errorThrown) { + if (embeddedMode) { + updateSidecarAsEditor(ecfg, "Status code: " + jqXHR.status + "\n\n" + errorThrown); + } else { + closeTabByCfg(ecfg); + showModal({ + title: "Error", + body: "
" + label + " - Error occurred!

Status code: " + jqXHR.status + "

" + htmlEncode(errorThrown) + "
", + }); + } + }); + + } + + function changeDirectory(dir){ + if (dir) { + $(".ce_show_filesystem ").click(); + readFolder(dir.replace(/[\/\\]$/g, ""), 'fwd'); + } + } + + function replaceTokens(str, file){ + var basefile = dodgyBasename(file); + var dirname = dodgyDirname(file); + return str.replace(/\$\{(FILE|BASEFILE|DIRNAME)(?:,(\-?\d+))?(?:,(\-?\d+))?\}/g,function(all, g1, g2, g3){ + var ret, l; + if (g1=="FILE") { ret = file; } + if (g1=="BASEFILE") { ret = basefile; } + if (g1=="DIRNAME") { ret = dirname; } + l = ret.length; + if (typeof g3 !== "undefined") { g2 = parseInt(g2); g3 = parseInt(g3); return ret.substr(g2 < 0 ? l + g2 : g2, g3 < 0 ? l + g3 : g3); } + if (typeof g2 !== "undefined") { g2 = parseInt(g2); return ret.substr(g2 < 0 ? l + g2 : g2); } + return ret; + }); + } + + function runAction(actionStr, file, embeddedMode) { + var parts = actionStr.split(":"); + var action = parts.shift(); + var args = parts.join(":"); + if (file !== undefined) { + args = replaceTokens(args, file); + } + hooksCfg[action](args, undefined, embeddedMode); + } + + // Keep track of what tabs are open in local storage. + function openTabsListChanged(){ + var t = []; + for (var j = 0; j < editors.length; j++){ + editors[j].position = editors[j].tab.index(); + } + editors.sort(function(a,b){ + if (a.position > b.position) { + return 1; + } else if (b.position > a.position) { + return -1; + } else { + return 0; + } + }); + activeTab = $ce_tabs.children(".ce_active").index(); + for (var i = 0; i < editors.length; i++){ + if (tabCfg[editors[i].type].can_reopen) { + t.push({label: editors[i].label, type: editors[i].type, file: editors[i].file}); + } + } + localStorage.setItem('ce_open_tabs', JSON.stringify(t)); + updateUrlHash(); + } + + function updateUrlHash(){ + var hashparts = [inFolder], + last_used_idx, + newest; + for (var i = 0; i < editors.length; i++){ + if (tabCfg[editors[i].type].can_reopen) { + if (! newest || newest < editors[i].last_opened) { + newest = editors[i].last_opened; + last_used_idx = (hashparts.length - 1) / 2; + } + hashparts.push(editors[i].type); + hashparts.push(editors[i].file); + } + } + hashparts.unshift(last_used_idx); + if (history.replaceState) { + history.replaceState(null, null, '#' + hashparts.join("|")); + } else { + location.hash = '#' + encodeURIComponent(hashparts.join("|")); + } + } + + function readUrlHash(){ + var parts = decodeURIComponent(document.location.hash.substr(1)).split("|"); + if (parts.length > 1) { + inFolder = parts[1]; + for (var i = 2; (i + 1) < parts.length; i+=2) { + // check to make sure its allowed first! This protects against someone crafting a bad url (e.g. a "run" command) and sending it to a victim + if (tabCfg[parts[i]].can_reopen) { + var file_parts = parts[i+1].split("@"); + if (file_parts.length > 1) { + doLineHighlight = file_parts[1]; + hooksCfg[parts[i]](file_parts[0]); + + } else { + hooksCfg[parts[i]](parts[i+1]); + } + + } + } + var tabIdx = parseInt(parts[0],10); + if (parts.length > 2 && !isNaN(tabIdx)) { + activateTab(tabIdx); + } + } + } + + // This can be used like so: + // var bc = new BroadcastChannel("config_explorer"); bc.postMessage({action:"open",type:"rest",path:"/servicesNS/admin/search/data/ui/views/aaa_dump"}) + function handleBroadcastMessage(event) { + console.log("Received broadcast message", event); + if (event.data && event.data.hasOwnProperty("action") && event.data.action==="open") { + if (tabCfg[event.data.type].can_reopen) { + hooksCfg[event.data.type](event.data.path); + broadcastChannel.postMessage({ + action:"opened", + type: event.data.type, + path: event.data.path + }); + } + } + } + + function getPreferences() { + var preferences; + try { + preferences = JSON.parse(localStorage.getItem('ce_preferences')); + } catch(e) {} + if (! preferences || $.isEmptyObject(preferences)) { + preferences = { + "cursorBlinking": "blink", + "cursorSmoothCaretAnimation": false, + "minimap": { + "renderCharacters": true, + "showSlider": "mouseover" + } + }; + } + return preferences; + } + // This is an action that will occur after saving the file + function openPreferences() { + showModal({ + title: "Preferences", + size: 500, + body: "
Preferences will only affect sessions from this browser."+ + "

Enable word-wrap "+ + "
Enable visible whitespace "+ + //"
Reuse tabs for post-save actions "+ + "
Hover tooltip "+ + "
Show full file path in tab (refresh required)"+ + "

Advanced editor options (See here)
"+ + "
"+ + "
", + onShow: function(){ + // On load set the fields to the current values + var preferences = getPreferences(); + if (preferences.hasOwnProperty("wordWrap") && preferences.wordWrap === "on") { + $(".ce_pref_item .ce_wordWrap").prop('checked', true); + } + if (preferences.hasOwnProperty("renderWhitespace") && preferences.renderWhitespace === "all") { + $(".ce_pref_item .ce_renderWhitespace").prop('checked', true); + } + //if (preferences.hasOwnProperty("ce_reuseWindow") && preferences.ce_reuseWindow) { + // $(".ce_pref_item .ce_reuseWindow").prop('checked', true); + //} + if (!(preferences.hasOwnProperty("hover") && preferences.hover.hasOwnProperty("enabled") && ! preferences.hover.enabled)) { + $(".ce_pref_item .ce_hideSpecTooltip").prop('checked', true); + } + if (preferences.hasOwnProperty("ce_fullPathTab") && preferences.ce_fullPathTab) { + $(".ce_pref_item .ce_fullPathTab").prop('checked', true); + } + + + delete preferences.wordWrap; + delete preferences.renderWhitespace; + delete preferences.ce_reuseWindow; + delete preferences.ce_fullPathTab; + if (preferences.hasOwnProperty("hover")) { + delete preferences.hover.enabled; + if ($.isEmptyObject(preferences.hover)) { + delete preferences.hover; + } + } + $(".ce_pref_item .ce_pref_advanced").val(JSON.stringify(preferences,null,3)); + }, + actions: [{ + onClick: function(){ + try { + preferences = JSON.parse($(".ce_pref_item .ce_pref_advanced").val()); + } catch (e) { + preferences = {}; + } + preferences.wordWrap = ($(".ce_pref_item input.ce_wordWrap:checked").length > 0) ? "on" : "off"; + preferences.renderWhitespace = ($(".ce_pref_item input.ce_renderWhitespace:checked").length > 0) ? "all" : "none"; + //preferences.ce_reuseWindow = ($(".ce_pref_item input.ce_reuseWindow:checked").length > 0); + preferences.ce_fullPathTab = ($(".ce_pref_item input.ce_fullPathTab:checked").length > 0); + if (! preferences.hasOwnProperty("hover")) { + preferences.hover = {}; + } + if ($(".ce_pref_item input.ce_hideSpecTooltip:checked").length === 0) { + preferences.hover.enabled = false; + } else { + preferences.hover.enabled = true; + } + localStorage.setItem('ce_preferences', JSON.stringify(preferences)); + // Update all currently open windows + for (var i = 0; i < editors.length; i++) { + if (editors[i].hasOwnProperty("editor")) { + editors[i].editor.updateOptions(preferences); + } + } + $(".modal").modal('hide'); + }, + cssClass: 'btn-primary', + label: "Save" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + // This is an action that will occur after saving the file + function setPostSaveAction() { + var ecfg = editors[activeTab]; + var suggestions = []; + for (var j = 0; j < hooksActive.length; j++) { + if (hooksActive[j]._match.test(ecfg.file) && hooksActive[j].matchtype == "file" && isTrueValue(hooksActive[j].showWithSave)) { + suggestions.push("Suggest: " + htmlEncode(replaceTokens(hooksActive[j].action, ecfg.file)) + "
"); + } + } + showModal({ + title: "Set post-save action", + size: 900, + body: "
Enter a command to automatically run after successful save of this file only. This action will be saved in your browser local storage "+ + "(it will not affect other users or other browsers you use, but it will be remembered after browser refresh). "+ + "Run commands will be executed from the SPLUNK_HOME directory.

"+ + "File: " + htmlEncode(ecfg.file) + ""+ + "

"+ + suggestions.join('') + + "

" + + ""+ + "
"+ + "
"+ + //"
Run in background tab:
"+ + //"
The following options will check the returned content from a post-save action for a specific string and will show a success or failure icon on the tab. Only one value is required for the icon to be displayed.
"+ + //"
Content match for success:
"+ + //"
Content match for failure:
"+ + "
", + onShow: function(){ + // On load set the fields to the current values + var p = getPostSave(ecfg.file); + if (p !== null) { + $(".ce_postsave_arg0").val(p[0]); + $(".ce_postsave_arg1").val(p[1]); + //$(".ce_postsave_background").val(p[2]); + //$(".ce_postsave_strmatch_good").val(p[3]); + //$(".ce_postsave_strmatch_bad").val(p[4]); + } + $(".ce_postsave_suggestion").on("click", function(){ + var s = $(this).html(); + var sparts = s.split(":"); + $(".ce_postsave_arg0").val(sparts.shift()); + $(".ce_postsave_arg1").val(sparts.join(":")); + }); + }, + actions: [{ + onClick: function(){ + var postsave = (JSON.parse(localStorage.getItem('ce_postsave')) || {}); + var arg0 = $(".ce_postsave_arg0").val(); + var arg1 = $(".ce_postsave_arg1").val(); + //var background = $(".ce_postsave_background").val(); + //var strmatch_good = $(".ce_postsave_strmatch_good").val(); + //var strmatch_bad = $(".ce_postsave_strmatch_bad").val(); + if (arg0 === "nothing") { + delete postsave[ecfg.file]; + } else { + postsave[ecfg.file] = [arg0, arg1]; //, background, strmatch_good, strmatch_bad]; + } + localStorage.setItem('ce_postsave', JSON.stringify(postsave)); + $(".modal").modal('hide'); + }, + cssClass: 'btn-primary', + label: "Save" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + // Read local storage to get any post-save action that exists for this file + function getPostSave(file) { + var parts; + var postsave = (JSON.parse(localStorage.getItem('ce_postsave')) || {}); + if (postsave.hasOwnProperty(file)){ + // Handle legacy format + if (typeof postsave[file] === "string") { + parts = postsave[file].split(":"); + var action = parts.shift(); + var args = replaceTokens(parts.join(":"), file); + return [action,args]; + } else { + parts = postsave[file]; + parts[1] = replaceTokens(parts[1], file); + return parts; + } + } + return null; + } + + // Run button + function runShellCommand(contents, useSHOME) { + var history_idx = run_history.length, + in_progress_cmd = '', + $input, + cwd = ""; + if (inFolder !== "."){ + cwd = "

Working directory:

"+ + "
"+ + "

"; + } + showModal({ + title: "Run ", + size: 600, + body: "
Enter a command to run on the server. Warning: Be careful with commands that do not exit as they will become orphaned processes. This does not have a timeout.

" + + cwd + + ""+ + "
", + onShow: function(){ + $input = $('.ce_prompt_input'); + if (contents) { + $input.val(contents); + } + // Provide a history of run commands + $input.focus().on('keydown', function(e) { + // on enter, submit form + if (e.which === 13) { + $('.modal').find('button:first-child').click(); + } else if (e.which === 38) {// up arrow + if (history_idx === run_history.length) { + in_progress_cmd = $input.val(); + } + history_idx--; + if (history_idx < 0) {history_idx = 0;} + $input.val(run_history[history_idx]); + } else if (e.which === 40) { // down arrow + if (history_idx === run_history.length) { return; } + history_idx++; + if (history_idx === run_history.length) { + $input.val(in_progress_cmd); + } else { + $input.val(run_history[history_idx]); + } + } + }); + }, + actions: [{ + onClick: function(){ + var runDir = $(".ce_run_cwd_radio_shome:checked").length; + $('.modal').one('hidden.bs.modal', function() { + var command = $input.val(); + if (command) { + if (runDir) { + runShellCommandNow(command, "", false); + } else { + runShellCommandNow(command, inFolder, false); + } + } + }).modal('hide'); + }, + cssClass: 'btn-primary', + label: "Run" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + function debugRefreshEndpointSelection() { + showModal({ + title: "Debug/refresh endpoints", + size: 1000, + body: "
Select endpoint to debug/refresh. This list of endpoints is configured in Settings (config_explorer.conf) property: debug_refresh_endpoints

", + onShow: function(){ + var $debugrefreshEndpoints = $(".ce-debugrefresh-endpoints"); + var str =""; + for (var i = 0; i < conf._debug_refresh_endpoints.length; i++) { + var epoint = $.trim(conf._debug_refresh_endpoints[i]); + if (epoint) { + str += "" + htmlEncode(epoint) + ""; + } + } + + $debugrefreshEndpoints + .html(str) + .on("click","a",function(e){ + e.preventDefault(); + e.stopPropagation(); + var $this = $(this); + $(".modal").modal('hide'); + debugRefreshBumpHook( $this.text() ); + }); + }, + actions: [{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + + + // Run button + function runReloadDeployServer() { + showModal({ + title: "Reload deploy-server", + size: 1000, + body: "
Select server class to reload.

All server classes
", + onShow: function(){ + var $serverClasses = $(".ce-server-classes"); + $ce_spinner.clone().appendTo($serverClasses); + + service.get('/services/deployment/server/serverclasses', {count:0, f:"name"}, function(err, r) { + if (err) { + console.error(err); + showModal({ + title: "Error", + body: "
Unexpected error occurred retreiving serverclasses list

" + htmlEncode(JSON.stringify(err)) + "
", + }); + } + var str = ""; + //console.log("resp",r.data); + if (r && r.data && r.data.entry) { + for (var i = 0; i < r.data.entry.length; i++) { + str += "" + htmlEncode(r.data.entry[i].name) + ""; + } + } + $serverClasses.html(str); + $(".ce-deployserver").on("click","a",function(e){ + e.preventDefault(); + e.stopPropagation(); + var $this = $(this); + $(".modal").modal('hide'); + if ($this.hasClass("ce-server-classes-all")) { + runReloadDeployServerNow(); + } else { + runReloadDeployServerNow($this.text()); + //runShellCommandNow("./bin/splunk reload deploy-server -class \"" + $this.text() + "\""); + } + }); + }); + }, + actions: [{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + function runReloadDeployServerNow(srvclass) { + if (typeof srvclass === undefined) { + srvclass = ""; + } + var command = "reload deploy-server"; + if (tabAlreadyOpen('deployserver', "")) { + closeTabByName('deployserver', ""); + } + var ecfg = createTab('deployserver', "", '$ ' + htmlEncode(command)); + serverActionWithoutFlicker({action: 'deployserver', path: srvclass}).then(function(contents){ + updateTabAsEditor(ecfg, contents, 'plaintext'); + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + + + function runShellCommandNow(command, fromFolder, embeddedMode){ + if (typeof embeddedMode === "undefined") { + embeddedMode = false; + } + var ecfg; + var label = '$ ' + htmlEncode(command); + var timer = $("
"); + if (embeddedMode) { + ecfg = createTabSidecar(label); + timer.appendTo(ecfg.sidecar_editor_container); + } else { + ecfg = createTab('run', command, label); + timer.appendTo(ecfg.editor_container); + } + //var cancel = $("").appendTo(ecfg.container); + + var started = Date.now(); + var interval = setInterval(function() { + var tt = Math.round((Date.now() - started) / 1000); + if (tt > 2) { + timer.html(tt + " sec"); + } + },1000); + // trim length + if (run_history.length > 50) { + run_history.shift(); + } + // only save if the command is different to what was last run + if (command !== run_history[(run_history.length - 1)]) { + run_history.push(command); + } + // save to localstorage + localStorage.setItem('ce_run_history', JSON.stringify(run_history)); + if (typeof fromFolder === "undefined") { + fromFolder = ""; + } + ecfg.fromFolder = fromFolder; + serverActionWithoutFlicker({action: 'run', path: command, param1: fromFolder}).then(function(contents){ + clearInterval(interval); + if (embeddedMode) { + updateSidecarAsEditor(ecfg, contents); + } else { + if (/git +diff/.test(command)) { + updateTabAsEditor(ecfg, contents, "git-diff"); + } else if (/git +log/.test(command)) { + updateTabAsEditor(ecfg, contents, "git-log"); + } else { + updateTabAsEditor(ecfg, contents, 'plaintext'); + } + } + // refresh left pane + refreshFolder(); + }).catch(function(){ + clearInterval(interval); + if (embeddedMode) { + updateSidecarAsEditor(ecfg, "An unexpected error occured."); + } else { + closeTabByCfg(ecfg); + } + }); + } + + // Check config + function runBToolCheck() { + var ecfg = createTab('btool-check', 'btool-check', 'btool check '); + serverActionWithoutFlicker({action: 'btool-check'}).then(function(contents){ + contents = contents.replace(/^(No spec file for|Checking):.*\r?\n/mg,'').replace(/^\t\t/mg,'').replace(/\n{2,}/g,'\n\n'); + if ($.trim(contents)) { + updateTabAsEditor(ecfg, contents, 'plaintext'); + } else { + closeTabByCfg(ecfg); + showModal({ + title: "Info", + body: "
No configuration errors found
", + size: 300 + }); + } + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + + function getRest(path, args) { + return new Promise(function(resolve, reject){ + service.get(path, args, function(err, r) { + if (err) { + reject(err); + } + if (r && r.data && r.data.entry) { + // for (var i = 0; i < r.data.entry.length; i++) { + // str += "[" + r.data.entry[i].name + "]\n"; + // var props = Object.keys(r.data.entry[i].content); + // props.sort(); + // for (var j = 0; j < props.length; j++) { + // if (props[j].substr(0,4) !== "eai:" && !(props[j] === "disabled" && ! r.data.entry[i].content[props[j]])) { + // str += props[j] + " = " + r.data.entry[i].content[props[j]] + "\n"; + // } + // } + // } + //if (str) { + resolve(r.data.entry); + //} else { + // reject(); + //} + } else { + reject(); + } + }); + }); + } + + function getRunningConfig(path) { + path = path.replace(/\.conf$/i,""); + return new Promise(function(resolve, reject){ + service.get('/servicesNS/-/-/configs/conf-' + path, null, function(err, r) { + if (err) { + reject(err); + } + var str = ""; + if (r && r.data && r.data.entry) { + for (var i = 0; i < r.data.entry.length; i++) { + str += "[" + r.data.entry[i].name + "]\n"; + var props = Object.keys(r.data.entry[i].content); + props.sort(); + for (var j = 0; j < props.length; j++) { + if (props[j].substr(0,4) !== "eai:" && !(props[j] === "disabled" && ! r.data.entry[i].content[props[j]])) { + str += props[j] + " = " + r.data.entry[i].content[props[j]] + "\n"; + } + } + } + if (str) { + resolve(str); + } else { + reject(); + } + } else { + reject(); + } + }); + }); + } + + function runningVsLayered(path, compare){ + path = path.replace(/\.conf$/i,""); + var type = 'live'; + var tab_path_fmt = 'live: ' + path; + if (compare) { + type = 'live-diff'; + tab_path_fmt = 'live/btool: ' + path; + } + if (! tabAlreadyOpen(type, path)) { + var ecfg = createTab(type, path, tab_path_fmt); + serverActionWithoutFlicker({action: 'btool-list', path: path}).then(function(contents){ + var c = formatBtoolList(contents, "btool-hidepaths"); + if ($.trim(c)) { + getRunningConfig(path).then(function(contents_running){ + if (compare) { + updateTabAsDiffer( + ecfg, + "# Filesystem config\n" + formatLikeRunningConfig(contents), + "# Running config\n" + contents_running + ); + } else { + updateTabAsEditor(ecfg, contents_running, 'ini'); + } + }).catch(function(){ + closeTabByCfg(ecfg); + showModal({ + title: "Warning", + body: "
Could not get retreieve running config for " + htmlEncode(path) + "
", + size: 300 + }); + }); + } else { + closeTabByCfg(ecfg); + showModal({ + title: "Error", + body: "
No btool data returned for " + htmlEncode(path) + "
", + size: 300 + }); + } + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + } + + function runBToolList(inPath, type, origPath, replacementPath){ + var parts = inPath.split(":"); + var conf_file = parts.shift().replace(/\.conf$/i, ""); + var path = parts.join(":"); + // There are three special "paths" which we replace with the dynamic value + if (path === "deployment-apps"){ + if (conf.btool_dir_for_deployment_apps) { + path = conf.btool_dir_for_deployment_apps; + origPath = conf.btool_dir_for_deployment_apps; + replacementPath = "/splunk/etc/deployment-apps/"; + } else { + path = ""; + } + } + if (path === "master-apps") { + if (conf.btool_dir_for_master_apps) { + path = conf.btool_dir_for_master_apps; + origPath = conf.btool_dir_for_master_apps; + replacementPath = "/splunk/etc/master-apps/"; + } else { + path = ""; + } + } + if (path === "manager-apps") { + if (conf.btool_dir_for_manager_apps) { + path = conf.btool_dir_for_manager_apps; + origPath = conf.btool_dir_for_manager_apps; + replacementPath = "/splunk/etc/manager-apps/"; + } else { + path = ""; + } + } + if (path === "shcluster") { + if (conf.btool_dir_for_shcluster_apps) { + path = conf.btool_dir_for_shcluster_apps; + } else { + path = ""; + } + } + var tab_path_fmt = 'btool: ' + conf_file + (type === "btool" ? "" : " (" + type.substr(6) + ")"); + if (tabAlreadyOpen(type, conf_file + ":" + path)) { + closeTabByName(type, conf_file + ":" + path); + } + var ecfg = createTab(type, conf_file + ":" + path, tab_path_fmt); + serverActionWithoutFlicker({action: 'btool-list', path: conf_file, param1: path}).then(function(contents){ + if (typeof origPath !== "undefined") { + contents = adjustBtoolPaths(contents, origPath, replacementPath); + } + var c = formatBtoolList(contents, type); + if ($.trim(c)) { + updateTabAsEditor(ecfg, c, 'ini'); + ecfg.btoollist = contents; + serverAction({action: 'spec-hinting', path: conf_file}).then(function(h){ + ecfg.hinting = buildHintingLookup(conf_file, h); + }); + } else { + closeTabByCfg(ecfg); + showModal({ + title: "Warning", + body: "
No contents for \"" + htmlEncode(tab_path_fmt) + "\"
", + size: 300 + }); + } + }).catch(function(){ + console.error(arguments); + closeTabByCfg(ecfg); + }); + } + + function displaySpecFile(path) { + path = path.replace(/\.conf$/i,""); + var tab_path_fmt = 'spec: ' + path; + if (! tabAlreadyOpen('spec', path)) { + var ecfg = createTab('spec', path, tab_path_fmt); + serverActionWithoutFlicker({action: 'spec', path: path}).then(function(contents) { + if ($.trim(contents)) { + updateTabAsEditor(ecfg, contents, 'ini'); + } else { + closeTabByCfg(ecfg); + showModal({ + title: "Error", + body: "
No spec file found!
", + size: 300 + }); + } + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + } + + // Update and display the left pane in filesystem mode + function showTreePaneSpinner(direction) { + if (! leftpane_ignore) { + leftpane_ignore = direction || "none"; + $ce_file_wrap.addClass("ce_move_" + leftpane_ignore); + $ce_spinner.clone().appendTo($ce_tree_pane); + $ce_tree_icons.find('i').addClass("ce_disabled"); + } + } + + function refreshFolder(){ + readFolderFromServer(inFolder); + } + + function getTreeCache(path, depth) { + var patharray = path.split("/"); + if (typeof depth === "undefined") { + depth = patharray.length; + } else { + // make sure we arent attempting to go deeper than the length of the path + depth = Math.min(patharray.length, depth); + } + var base = filecache; + if (filecache === null) { + return base; + } + for (var i = 1; i < depth; i++) { + if (base.hasOwnProperty(patharray[i])) { + base = base[patharray[i]]; + } else { + base = null; + break; + } + } + return base; + } + + // Read the folder from the cache + function readFolder(path, direction) { + //path = path.replace(/\/{2,}/,"/"); + path = path.replace(/(?:\/\.|\/)+$/g,""); + filterModeReset(); + var base = getTreeCache(path); + if (base === null || ! base.hasOwnProperty(".")){ + readFolderFromServer(path, direction); + } else { + folderContents = []; + for (var key in base) { + if (base.hasOwnProperty(key) && key !== ".") { + folderContents.push({ + sortkey: key.toLocaleLowerCase(), + dir: true, + name: key + }); + } + } + if (base.hasOwnProperty(".")) { + for (var j = 0; j < base["."].length; j++) { + folderContents.push({ + sortkey: base["."][j].toLocaleLowerCase(), + dir: false, + name: base["."][j] + }); + } + } + readFolderLoad(path); + // Even though we just loaded the folder contents from cache, we still request data from the server which will be updated once it is ready. + // this keeps the UI fast and makes sure that stuff hasnt changed after the cache was generated. It also allows for sorting by size/timestamp + readFolderFromServerWithoutSpinner(path, direction); + } + } + + function readFolderFromServer(path, direction) { + showTreePaneSpinner(direction); + openingFolder = path; + return readFolderFromServerActual(path, direction); + } + + function readFolderFromServerWithoutSpinner(path, direction) { + openingFolder = path; + return readFolderFromServerActual(path, direction); + } + + function readFolderFromServerActual(path, direction) { + return serverAction({action: 'read', path: path}).then(function(contents){ + // Make sure the user didnt navigate to another folder while waiting for the server query + if (openingFolder !== path) { return; } + var i; + // if filecache is null it means user turned it off by setting conf to -1 + if (filecache !== null) { + var base = getTreeCache(path); + // base can be null if the screen was opened when we were already deep in the uncached zone + if (base !== null) { + var folders = ["."]; + base["."] = []; + for (i = 0; i < contents.length; i++) { + if (!contents[i][0]) { + base["."].push(contents[i][1]); + } else { + folders.push(contents[i][1]); + if (! base.hasOwnProperty(contents[i][1])) { + base[contents[i][1]] = {}; + } + } + } + // Go through and delete any keys that might no longer exist + for (var key in base) { + if (base.hasOwnProperty(key) && folders.indexOf(key) === -1) { + delete base[key]; + } + } + } + } + folderContents = []; + for (i = 0; i < contents.length; i++) { + folderContents.push({ + sortkey: contents[i][1].toLocaleLowerCase(), + dir: !!(contents[i][0]), + name: contents[i][1], + time: contents[i][2], + size: contents[i][3], + }); + } + readFolderLoad(path); + }).catch(function(msg){ + leftPaneRemoveSpinner(); + $ce_file_wrap.empty(); + $ce_file_path.empty(); + $("
Error loading folder contents
(was folder deleted?)

Retry or Go to SPLUNK_HOME
").appendTo($ce_file_wrap); + $ce_file_wrap.find(".ce_tree_retry").on("click", function(){ + return readFolderFromServer(path, direction); + }); + $ce_file_wrap.find(".ce_tree_reset").on("click", function(){ + return readFolderFromServer("."); + }); + }); + } + + function readFolderLoad(path){ + inFolder = path; + updateUrlHash(); + localStorage.setItem('ce_current_path', inFolder); + folderContents.sort(function(a, b) { + if (a.dir === b.dir) { + if (sortMode === "size" || sortMode === "time") { + if (sortAsc) { + return a[sortMode] > b[sortMode] ? -1 : a[sortMode] < b[sortMode] ? 1 : a.sortkey > b.sortkey ? 1 : a.sortkey < b.sortkey ? -1 : 0; + } + return a[sortMode] > b[sortMode] ? 1 : a[sortMode] < b[sortMode] ? -1 : a.sortkey > b.sortkey ? 1 : a.sortkey < b.sortkey ? -1 : 0; + } + // sort by name + if (sortAsc) { + return a.sortkey > b.sortkey ? 1 : a.sortkey < b.sortkey ? -1 : 0; + } + return a.sortkey > b.sortkey ? -1 : a.sortkey < b.sortkey ? 1 : 0; + } + return b.dir ? 1 : -1; + }); + leftPaneFileList(); + } + + function filePathRTLCheck() { + var span = $ce_file_path.find("span"); + if (span.attr("title")) { + if (span.width() > $ce_file_path.width()) { + $ce_file_path.addClass('ce_rtl'); + } else { + $ce_file_path.removeClass('ce_rtl'); + } + } + } + + function leftPaneRemoveSpinner(){ + if (leftpane_ignore) { + if (leftpane_ignore === 'fwd') { + $ce_file_wrap.css({transition: "all 0ms", transform: "translate(200px, 0px)", opacity: 0}); + } else if (leftpane_ignore === 'back') { + $ce_file_wrap.css({transition: "all 0ms", transform: "translate(-200px, 0px)", opacity: 0}); + } else { + $ce_file_wrap.css({transition: "all 0ms", transform: "", opacity: 0}); + } + $ce_file_wrap.removeClass("ce_move_none ce_move_fwd ce_move_back"); + $ce_tree_pane.find(".ce_spinner, .ce_fs_slow_message").remove(); + setTimeout(function(){ + $ce_file_wrap.css({transition: "", transform: "", opacity: ""}); + },0); + leftpane_ignore = false; + } + } + + function formatSize(bytes) { + if (bytes === 0) return '0 B'; + var k = 1024; + var dm = 2; + var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + var i = Math.floor(Math.log(bytes) / Math.log(k)); + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i] + ''; + } + + function formatDate(val) { + var d = new Date(val*1000); + return d.toLocaleString(); + } + + function leftPaneFileList(filter){ + leftPaneRemoveSpinner(); + $ce_file_wrap.empty(); + $ce_file_path.empty(); + $ce_tree_icons.find('i').removeClass("ce_disabled"); + if (inFolder === ".") { + $(".ce_folder_up").addClass("ce_disabled"); + } else { + $(".ce_folder_up").removeClass("ce_disabled"); + } + $("").appendTo($ce_file_path); + var files = 0; + var filter_re; + if (filter) { + filter_re = new RegExp(escapeRegExp(filter), 'gi'); + } + for (var i = 0; i < folderContents.length; i++) { + var item = folderContents[i].name; + if (! filter || item.toLowerCase().indexOf(filter) > -1) { + var icon = (folderContents[i].dir) ? "folder" : "report"; + var text = htmlEncode(item); + if (filter) { + text = text.replace(filter_re, "$&"); + } + $("
"+ + " " + + "
" + text + "
"+ + "
" + (folderContents[i].size > -1 && folderContents[i].hasOwnProperty("size") ? formatSize(folderContents[i].size) : "") + "
"+ + "
" + (folderContents[i].time > -1 && folderContents[i].hasOwnProperty("time") ? formatDate(folderContents[i].time) : "") + "
"+ + "
").attr("file", inFolder + "/" + item).appendTo($ce_file_wrap); + files++; + } + } + if (files===0) { + if (filter) { + $("
Not found: " + htmlEncode(filter) + "
").appendTo($ce_file_wrap); + } else { + $("
Folder empty
").appendTo($ce_file_wrap); + } + } else { + if (treeSearchFocus && $(".ce_leftnav_keyboard_selected").length == 0) { + $ce_file_wrap.children(".ce_leftnav").first().addClass("ce_leftnav_keyboard_selected"); + } + + } + $ce_file_path.find("span, bdi").attr("title", inFolder).text(inFolder + '/' + (files > 1 ? '\xa0\xa0\xa0\xa0\xa0' + files : "")); + filePathRTLCheck(); + } + + function leftPaneRestList(filter){ + //leftPaneRemoveSpinner(); + $ce_file_wrap.empty(); + $ce_file_path.empty(); + $ce_tree_icons.find('i').removeClass("ce_disabled"); + var crumbs = ""; + if (inFolderRestType === "") { + $(".ce_folder_up_rest").addClass("ce_disabled"); + //leftPaneRestListGetTypes(); + } else if (inFolderRestApp === "") { + $(".ce_folder_up_rest").addClass("ce_disabled"); + crumbs = "."; //inFolderRestType; + leftPaneRestListGet("apps", filter); + } else { + crumbs = "./" + inFolderRestApp; //inFolderRestType + + leftPaneRestListGet(inFolderRestType, filter); + } + $("").appendTo($ce_file_path); + $ce_file_path.find("span, bdi").attr("title", crumbs).text(crumbs + '/'); + filePathRTLCheck(); + localStorage.setItem('ce_current_path_restapp', inFolderRestApp); + } + + var restTypes = { + "views": { + endpoint: "/data/ui/views", + args: { + count:0, + f: "label", + search: "(isDashboard=1 AND (rootNode=\"dashboard\" OR rootNode=\"form\" OR rootNode=\"view\" OR rootNode=\"html\") AND isVisible=1)" + } + }, + "apps": { + endpoint: "/services/apps/local", + }, + + }; + + function leftPaneRestListGet(type, filter) { + var label; + var files = false; + var i; + var filter_re; + if (filter) { + filter_re = new RegExp(escapeRegExp(filter), 'gi'); + } + + // if app's cache doesnt exist, do that + if (! restTypes.apps.hasOwnProperty("cache")) { + getRest(restTypes.apps.endpoint, {count:0, f:"label"}).then(function(restData) { + //console.log(restData); + restTypes.apps.cache = {}; + for (var i = 0; i < restData.length; i++) { + restTypes.apps.cache[restData[i].name] = restData[i].content.label; + } + // try again + leftPaneRestListGet(type, filter); + }).catch(function(){ + showModal({ + title: "Warning", + body: "
Could not get rest data for apps
", + size: 300 + }); + }); + + + // if we dont have a cached copy of the data we need e.g. views, then get it now + } else if (! restTypes[inFolderRestType].hasOwnProperty("cache") ) { + getRest(restTypes[inFolderRestType].endpoint, restTypes[inFolderRestType].args).then(function(restData) { + //console.log(restData); + restTypes[inFolderRestType].cache = []; + for (var i = 0; i < restData.length; i++) { + var item = { + date: new Date(restData[i].updated).valueOf(), + link: restData[i].links.alternate, + app: restData[i].acl.app, + label: restData[i].content.hasOwnProperty("label") ? restData[i].content.label : "", + name: restData[i].name, + }; + restTypes[inFolderRestType].cache.push(item); + } + // try again + leftPaneRestListGet(type, filter); + }).catch(function(){ + showModal({ + title: "Warning", + body: "
Could not get rest data for " + htmlEncode(inFolderRestType) + "
", + size: 300 + }); + }); + + // we have the apps list and the data list + } else { + //console.log("using " + inFolderRestType + " cache", restTypes[inFolderRestType].cache); + if (type === "apps") { + var appList = {}; + var appListArray = []; + for (i = 0; i < restTypes[inFolderRestType].cache.length; i++) { + var app = restTypes[inFolderRestType].cache[i].app; + if (! appList.hasOwnProperty(app)) { + appList[app] = { + count:0, + latest:0, + app: app, + label_orig: restTypes.apps.cache[app] + }; + appListArray.push(appList[app]); + if (! restTypes.apps.cache[app] || displayModeRest==="n") { + appList[app].label = htmlEncode(app); + } else if (displayModeRest==="l") { + appList[app].label = htmlEncode(restTypes.apps.cache[app]); + } else if (displayModeRest==="ln") { + appList[app].label = htmlEncode(restTypes.apps.cache[app]) + " (" + htmlEncode(app) + ")"; + } else { //nl + appList[app].label = htmlEncode(app) + " (" + htmlEncode(restTypes.apps.cache[app]) + ")"; + } + } + appList[app].count++; + if (appList[app].latest < restTypes[inFolderRestType].cache[i].date) { + appList[app].latest = restTypes[inFolderRestType].cache[i].date; + } + } + + // sort apps + appListArray.sort(function(a, b) { + if (sortModeRest==="label"){ + return sortAscRest==="1" ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label); + } else if ( sortModeRest==="time"){ + return sortAscRest==="1" ? a.latest - b.latest : b.latest - a.latest; + } + }); + + for (i = 0; i < appListArray.length; i++) { + if (! filter || appListArray[i].app.toLowerCase().indexOf(filter) > -1 || appListArray[i].label_orig.toLowerCase().indexOf(filter) > -1) { + + files = true; + if (filter) { + appListArray[i].label = appListArray[i].label.replace(filter_re, "$&"); + } + $("
"+ + " " + + "
" + appListArray[i].label + " " + appListArray[i].count + "
"+ + "
").attr("restapp", appListArray[i].app).appendTo($ce_file_wrap); + } + + } + } else { + + // sort views / etc + restTypes[type].cache.sort(function(a, b) { + if (sortModeRest==="label"){ + if (displayModeRest==="l" || displayModeRest==="ln") { + return sortAscRest==="1" ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label); + } else { + return sortAscRest==="1" ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name); + } + } else if ( sortModeRest==="time"){ + return sortAscRest==="1" ? a.date - b.date : b.date - a.date; + } + }); + + for (i = 0; i < restTypes[type].cache.length; i++) { + if (restTypes[type].cache[i].app === inFolderRestApp) { + if (! filter || restTypes[type].cache[i].name.toLowerCase().indexOf(filter) > -1 || restTypes[type].cache[i].label.toLowerCase().indexOf(filter) > -1) { + files = true; + if (! restTypes[type].cache[i].label || displayModeRest==="n") { + label = htmlEncode(restTypes[type].cache[i].name); + } else if (displayModeRest==="l") { + label = htmlEncode(restTypes[type].cache[i].label); + } else if (displayModeRest==="ln") { + label = htmlEncode(restTypes[type].cache[i].label) + " (" + htmlEncode(restTypes[type].cache[i].name) + ")"; + } else { //nl + label = htmlEncode(restTypes[type].cache[i].name) + " (" + htmlEncode(restTypes[type].cache[i].label) + ")"; + } + if (filter) { + label = label.replace(filter_re, "$&"); + } + $("
"+ + "
" + label + "
"+ + "
").attr("restfile", restTypes[type].cache[i].link).appendTo($ce_file_wrap); + } + } + } + } + if (!files) { + $("
Nothing found
").appendTo($ce_file_wrap); + } else { + if (treeSearchFocus && $(".ce_leftnav_keyboard_selected").length == 0) { + $ce_file_wrap.children(".ce_leftnav").first().addClass("ce_leftnav_keyboard_selected"); + } + } + } + } + + // Handle clicking a rest link in the left pane, to open it in the right pane + function readFileRest(path){ + var label = preferences.ce_fullPathTab ? "" + dodgyRemoveRelPath(dodgyDirname(path)) + "" + dodgyBasename(path) : dodgyBasename(path); + var type = "rest"; + if (! tabAlreadyOpen(type, path)) { + var ecfg = createTab(type, path, label); + getRest(path, null).then(function(restData) { + //console.log(restData); //?output_mode=json&count=0&f=title&f=label + if (restData.length === 0) { + showModal({ + title: "Warning", + body: "
Nothing returned from REST API at: " + htmlEncode(path) + "
", + size: 300 + }); + closeTabByCfg(ecfg); + } else if (restData.length === 1) { + updateTabAsEditor(ecfg, restData[0].content['eai:data'], "xml"); + } else { + showModal({ + title: "Warning", + body: "
unexpectedly returned too many items from REST API at: " + htmlEncode(path) + "
", + size: 300 + }); + closeTabByCfg(ecfg); + } + + }).catch(function(){ + showModal({ + title: "Warning", + body: "
Unexpected error getting data from Splunk REST api: " + htmlEncode(path) + "
", + size: 300 + }); + closeTabByCfg(ecfg); + }); + } + } + + + // The conf file list + function leftPaneConfList(filter) { + $ce_file_wrap.empty(); + $ce_file_path.removeClass('ce_rtl').empty(); + var filter_re; + var files = false; + if (filter) { + filter_re = new RegExp(escapeRegExp(filter), 'gi'); + } + $("Splunk conf files").appendTo($ce_file_path); + for (var i = 0; i < confFilesSorted.length; i++) { + if (! filter) { + $("
").text(confFilesSorted[i]).attr("file", confFilesSorted[i]).prepend(" ").appendTo($ce_file_wrap); + files = true; + + } else if (confFilesSorted[i].toLowerCase().indexOf(filter) > -1) { + var text = htmlEncode(confFilesSorted[i]); + text = text.replace(filter_re, "$&"); + $("
").html(text).attr("file", confFilesSorted[i]).prepend(" ").appendTo($ce_file_wrap); + files = true; + } + } + if (!files){ + $("
Not found: " + htmlEncode(filter) + "
").appendTo($ce_file_wrap); + } else { + if (treeSearchFocus && $(".ce_leftnav_keyboard_selected").length == 0) { + $ce_file_wrap.children(".ce_leftnav").first().addClass("ce_leftnav_keyboard_selected"); + } + } + } + + // Click handler for Recent Files button in top right + // TODO [low] can we enhance this so it shows files by how often you use them? + function leftPaneRecentList(filter) { + $ce_file_wrap.empty(); + $ce_file_path.removeClass('ce_rtl').empty(); + var filter_re; + if (filter) { + filter_re = new RegExp(escapeRegExp(filter), 'gi'); + } + $("Recent files").appendTo($ce_file_path); + var counter = 0; + var openlabels = []; + for (var j = 0; j < editors.length; j++) { + openlabels.push(editors[j].label); + } + for (var i = closed_tabs.length - 1; i >= 0 ; i--) { + if (counter > max_recent_files_show) { + break; + } + // hide item if they are actually open at the moment + if (openlabels.indexOf(closed_tabs[i].label) === -1) { + var text = closed_tabs[i].label.replace(/^read:\s/,""); + if (! filter || text.toLowerCase().indexOf(filter) > -1) { + text = htmlEncode(text); + if (filter) { + text = text.replace(filter_re, "$&"); + } + var icon = "report"; + if (closed_tabs[i].type !== "read") { + icon = "bulb"; + } + counter++; + $("
" + text + "
").attr("file", closed_tabs[i].file).attr("title", closed_tabs[i].file).attr("type", closed_tabs[i].type).appendTo($ce_file_wrap); + } + } + } + if (counter === 0) { + if (filter) { + $("
Not found: " + htmlEncode(filter) + "
").appendTo($ce_file_wrap); + } else { + $("
Nothing here
").appendTo($ce_file_wrap); + } + } else { + if (treeSearchFocus && $(".ce_leftnav_keyboard_selected").length == 0) { + $ce_file_wrap.children(".ce_leftnav").first().addClass("ce_leftnav_keyboard_selected"); + } + } + } + + // Handle clicking an file or folder in the left pane + function readFile(path, customErrorCB){ + var label = preferences.ce_fullPathTab ? "" + dodgyRemoveRelPath(dodgyDirname(path)) + "" + dodgyBasename(path) : dodgyBasename(path); + var type = "read"; + if (path === "") { + label = "Settings"; + type = "settings"; + } + if (! tabAlreadyOpen(type, path)) { + var ecfg = createTab(type, path, label); + serverActionWithoutFlicker({action: 'read', path: path}, customErrorCB).then(function(contents){ + updateTabAsEditor(ecfg, contents); + if (ecfg.hasOwnProperty('matchedConf')) { + highlightBadConfig(ecfg); + if (confFiles.hasOwnProperty(ecfg.matchedConf)) { + serverAction({action: 'spec-hinting', path: ecfg.matchedConf}).then(function(c){ + ecfg.hinting = buildHintingLookup(ecfg.matchedConf, c); + }); + } + } + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + } + + + function fileSystemUpload(parentPath){ + showModal({ + title: "Create file, create folder or upload a file", + size: 580, + body: "
"+ + "
New file name:
"+ + + "
New folder name:
"+ + + "
Select upload file:
"+ + "
", + onShow: function(){ + $('.ce_prompt_input_file').focus().on('keydown', function(e) { + // submit form on enter key + if (e.which === 13) { + $('.ce_prompt_btn_file').click(); + } + }); + $('.ce_prompt_btn_file').on("click", function(){ + $('.modal').one('hidden.bs.modal', function() { + var fname = $('.ce_prompt_input_file').val(); + if (fname) { + showTreePaneSpinner(); + serverAction({action: 'newfile', path: parentPath, param1: fname}).then(function(){ + refreshFolder(); + showToast('Success'); + }).catch(function(){ + refreshFolder(); + }); + } + }).modal('hide'); + }); + $('.ce_prompt_input_folder').on('keydown', function(e) { + // submit form on enter key + if (e.which === 13) { + $('.ce_prompt_btn_folder').click(); + } + }); + $('.ce_prompt_btn_folder').on("click", function(){ + $('.modal').one('hidden.bs.modal', function() { + var fname = $('.ce_prompt_input_folder').val(); + if (fname) { + showTreePaneSpinner(); + serverAction({action: 'newfolder', path: parentPath, param1: fname}).then(function(){ + refreshFolder(); + showToast('Success'); + }).catch(function(){ + refreshFolder(); + }); + } + }).modal('hide'); + }); + $('.ce_prompt_btn_upload').on("click", function(){ + $('.modal').one('hidden.bs.modal', function() { + var file = $('.ce_file_upload_input')[0].files[0]; + var reader = new FileReader(); + var extract = ""; + var ecfg; + if ($('.ce_file_upload_extract:checked').length) { + extract = "e"; + ecfg = createTab('run', "", 'Extracted files: ' + htmlEncode(file.name)); + } + reader.onloadend = function() { + var upFileB64 = reader.result; + showTreePaneSpinner(); + serverAction({action: 'fileupload' + extract, path: parentPath, param1: file.name, file: upFileB64}).then(function(contents){ + if (ecfg) { + updateTabAsEditor(ecfg, contents, "plaintext"); + } else { + showToast('Success'); + } + refreshFolder(); + }).catch(function(){ + if (ecfg) { + closeTabByCfg(ecfg); + } + refreshFolder(); + }); + }; + reader.readAsDataURL(file); + }).modal('hide'); + }); + }, + actions: [] + }); + } + + // Rename a file or folder with a prompt window + function fileSystemRename(parentPath) { + if (fileIsOpenAndHasChanges(parentPath)) { return; } + var bn = dodgyBasename(parentPath); + showModal({ + title: "Rename", + size: 400, + body: "
Enter new name for " + bn + "

", + onShow: function(){ + $('.ce_prompt_input').focus().on('keydown', function(e) { + // submit form on enter key + if (e.which === 13) { + $('.modal').find('button:first-child').click(); + } + }); + }, + actions: [{ + onClick: function(){ + $('.modal').one('hidden.bs.modal', function() { + var newname = $('.ce_prompt_input').val(); + if (newname && newname !== bn) { + showTreePaneSpinner(); + serverAction({action: 'rename', path: parentPath, param1: newname}).then(function(){ + refreshFolder(); + showToast('Success'); + // if "path" is open in an editor, it needs to be closed without warning + closeTabByName("read", parentPath); + }).catch(function(){ + refreshFolder(); + }); + } + }).modal('hide'); + }, + cssClass: 'btn-primary', + label: "Rename" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + // Delete a file or folder with a popup windows + function filesystemDelete(file) { + if (fileIsOpenAndHasChanges(file)) { return; } + showModal({ + title: "Delete", + size: 550, + body: "
Are you sure you want to delete: " + file + "

To confirm type 'yes':

", + onShow: function(){ + $('.ce_prompt_input').focus().on("keyup blur", function(){ + if ($('.ce_prompt_input').val().toLowerCase() === "yes") { + $('.modal').find(".btn-danger").removeClass('btn-disabled'); + } else { + $('.modal').find(".btn-danger").addClass('btn-disabled'); + } + }).on('keydown', function(e) { + if (e.which === 13) { + $('.modal').find('button:first-child').click(); + } + }); + $('.modal').find('.ce_type_yes').on("click",function(){ + $('.ce_prompt_input').val("yes").blur(); + }); + }, + actions: [{ + onClick: function(){ + if ($('.ce_prompt_input').val().toLowerCase() !== "yes") { + return; + } + $('.modal').one('hidden.bs.modal', function() { + showTreePaneSpinner(); + serverAction({action: 'delete', path: file}).then(function(){ + refreshFolder(); + showToast('Success'); + // if "path" is open in an editor, it needs to be closed without warning + closeTabByName("read", file); + }).catch(function(){ + refreshFolder(); + }); + }).modal('hide'); + }, + cssClass: 'btn-danger btn-disabled', + label: "Delete" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } + + function showChangeLog() { + var ecfg = createTab('change-log', "", "Change log"); + serverActionWithoutFlicker({action: 'git-log', path: inFolder}).then(function(contents){ + updateTabAsEditor(ecfg, contents, "git-log"); + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + + // Git history of a specific file optionally between two commit tags + function getFileHistory(file, folder){ + var ecfg = createTab('history', file, "history: " + dodgyBasename(file)); + serverActionWithoutFlicker({action: 'git-history', path: file, param1: folder}).then(function(contents){ + contents = $.trim(contents); + if (! contents) { + showModal({ + title: "Warning", + body: "
No change history found for:

" + htmlEncode(file) + "
", + size: 400 + }); + closeTabByCfg(ecfg); + return; + } + updateTabAsEditor(ecfg, contents, "git-diff"); + }).catch(function(){ + closeTabByCfg(ecfg); + }); + } + + function activateTab(idx){ + if (idx < -1 || idx > (editors.length - 1) || (activeTab === idx && activeTab > -1)) { + return; + } + $ce_contents.children().addClass("ce_hidden"); + $ce_contents_home.addClass("ce_hidden"); + $ce_tabs.children().removeClass("ce_active"); + $ce_home_tab.removeClass("ce_active"); + activeTab = idx; + if (idx !== -1) { + editors[idx].tab.addClass('ce_active'); + editors[idx].tab_container.removeClass('ce_hidden'); + editors[idx].last_opened = Date.now(); + } else { + $ce_home_tab.addClass('ce_active'); + $ce_contents_home.removeClass('ce_hidden'); + } + doPipeTabSeperators(); + updateUrlHash(); + if (editors[idx] && editors[idx].hasOwnProperty("editor")) { + editors[idx].editor.focus(); + } + // switching tabs. check for changes + if (idx > -1) { + clearTimeout(fileModsCheckTimer); + fileModsCheckTimer = setTimeout(function(){ checkFileMods(); }, 1000); + } + } + + // The pipe seperators are between active tabs but not on the currently active tab or the one to its left. + function doPipeTabSeperators(){ + $(".ce_pipe, .ce_pipe_left").remove(); + for (var i = 0; i < editors.length; i++) { + if ((activeTab - 1) !== i && activeTab !== i) { + editors[i].tab.append(''); + } + } + if (activeTab >= 0) { + $ce_home_tab.append(''); + if (activeTab > 0) { + $ce_home_tab.append(''); + } + } + } + + // Check if tab is open with unsaved changes + function fileIsOpenAndHasChanges(file) { + for (var i = 0; i < editors.length; i++) { + if (editors[i].file === file) { + if (editors[i].hasChanges) { + showModal({ + title: "Warning", + body: "
Cannot rename or delete file becuase it is currently open with unsaved changes.
", + size: 350 + }); + return true; + } + } + } + return false; + } + + // A tab was opened but there was nothing to put in it, so it is closed. + function closeTabByCfg(ecfg) { + for (var i = 0; i < editors.length; i++) { + if (editors[i].id === ecfg.id) { + closeTabNow(i); + return; + } + } + } + + function closeTabByName(type, file) { + for (var i = 0; i < editors.length; i++) { + if (editors[i].file === file && editors[i].type === type) { + closeTabNow(i); + return; + } + } + } + + function closeTabByHookDetails(arg0, arg1) { + //if (preferences.ce_reuseWindow) { + if (arg0 === "bump") { + closeTabByName("refresh", "bump"); + } else if (arg0 === "run-safe") { + closeTabByName("run", arg1); + } else { + closeTabByName(arg0, arg1); + } + //} + } + + // Check if tab is already open, and if so, active it instead. + function tabAlreadyOpen(type, file) { + // check if file is already open + for (var i = 0; i < editors.length; i++) { + if (editors[i].type === type && editors[i].file === file) { + activateTab(i); + return true; + } + } + return false; + } + + function closeTabWithConfirmation(idx){ + if (editors[idx].hasChanges) { + showModal({ + title: "Unsaved changes", + body: "
Discard unsaved changes?
", + size: 300, + actions: [{ + onClick: function(){ + $(".modal").modal('hide'); + closeTabNow(idx); + }, + cssClass: 'btn-danger', + label: "Discard" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } else { + closeTabNow(idx); + } + } + + // when tabs are closed, remember in local storage for recent files list + function logClosedTab(ecfg){ + // make sure unique items only appear once + var splicy = -1; + for (var j = 0; j < closed_tabs.length; j++) { + if (ecfg.label === closed_tabs[j].label) { + splicy = j; + } + } + if (splicy > -1){ + closed_tabs.splice(splicy, 1); + } + if (tabCfg.hasOwnProperty(ecfg.type) && tabCfg[ecfg.type].can_reopen) { + closed_tabs.push({label: ecfg.label, type: ecfg.type, file: ecfg.file}); + } + // trim length + // There is a buffer of 10 so we can have things to show if the tabs are opened and thus removed from the list + if (closed_tabs.length > (max_recent_files_show + 10)) { + closed_tabs.shift(); + } + //persist to localstorage + localStorage.setItem('ce_closed_tabs', JSON.stringify(closed_tabs)); + } + + function closeTabNow(idx) { + logClosedTab(editors[idx]); + if (editors[idx].hasOwnProperty("editor")) { + editors[idx].editor.dispose(); + } + if (editors[idx].hasOwnProperty("model")) { + editors[idx].model.dispose(); + } + if (editors[idx].hasOwnProperty("sidecar_editor")) { + editors[idx].sidecar_editor.dispose(); + } + if (editors[idx].hasOwnProperty("sidecar_model")) { + editors[idx].sidecar_model.dispose(); + } + editors[idx].tab.remove(); + editors[idx].tab_container.remove(); + editors.splice(idx, 1); + openTabsListChanged(); + // if there are still tabs open, find the most recently used tab and activate that one + if ($ce_tabs.children().length === 0) { + activateTab(-1); + // if there is already a tab selected + } else if ($ce_tabs.children(".ce_active").length === 0) { + var last_used_idx, + newest; + for (var i = 0; i < editors.length; i++) { + if (! newest || newest < editors[i].last_opened) { + newest = editors[i].last_opened; + last_used_idx = i; + } + } + activateTab(last_used_idx); + } + } + + function createTabSidecar(label) { + var ecfg = editors[activeTab]; + if (! ecfg.sidecar_container) { + ecfg.sidecar_container = $("
").appendTo(ecfg.tab_container); + $("").appendTo(ecfg.sidecar_container) + .on("click", function(){ + if (ecfg.hasOwnProperty("sidecar_editor")) { + ecfg.sidecar_editor.dispose(); + } + if (ecfg.hasOwnProperty("sidecar_model")) { + ecfg.sidecar_model.dispose(); + } + ecfg.sidecar_container.remove(); + ecfg.sidecar_container = null; + }); + $("").appendTo(ecfg.sidecar_container) + .on("click", function(){ + if(ecfg.sidecar_container.hasClass("ce_editor_sidecar_autohide_on")) { + ecfg.sidecar_container.removeClass("ce_editor_sidecar_autohide_on"); + } else { + ecfg.sidecar_container.addClass("ce_editor_sidecar_autohide_on"); + } + + }); + ecfg.sidecar_title = $("
").appendTo(ecfg.sidecar_container).on("click", function(){ + //console.log("ecfg.sidecar_container.css.transform=", ecfg.sidecar_container.css("transform")); + // if the sidecar is collapsed + //if (ecfg.sidecar_container.css("transform") === "matrix(1, 0, 0, 1, 0, 467)") { + + // if sidecar is expanded + //} else + if (ecfg.sidecar_container.css("transform") === "" || ecfg.sidecar_container.css("transform") === "none" || ecfg.sidecar_container.css("transform") === "matrix(1, 0, 0, 1, 0, 0)"){ + ecfg.sidecar_container.css({transform: "translateY(" + (ecfg.sidecar_container.height() - 35) + "px)"}); + } else { + ecfg.sidecar_container.css({transform: "translateY(0)"}); + } + }); + ecfg.sidecar_resizer = $("
").appendTo(ecfg.sidecar_container); + ecfg.sidecar_autohide = $("
").appendTo(ecfg.sidecar_container); + ecfg.sidecar_editor_container = $("
").appendTo(ecfg.sidecar_container); + + // // Handler for resizing the tree pane/editor divider + ecfg.sidecar_resizer.on("mousedown", function(e) { + e.preventDefault(); + var was_autohide_on = !! ecfg.sidecar_container.hasClass("ce_editor_sidecar_autohide_on"); + ecfg.sidecar_container.removeClass("ce_editor_sidecar_autohide_on"); + $(document).one("mouseup",function(e) { + if (was_autohide_on) { + ecfg.sidecar_container.addClass("ce_editor_sidecar_autohide_on"); + } + $(document).off('mousemove.sidecar_resize'); + }); + $(document).on("mousemove.sidecar_resize", function(e) { + ecfg.sidecar_container.css({ + "transform": "translateY(0)", + "width": Math.min($ce_contents.width()-158, Math.max(360, (window.innerWidth - 150 - e.pageX))) + "px", + "height": Math.min($ce_contents.height(), Math.max(190, (window.innerHeight - e.pageY))) + "px" + }); + }); + }); + + } + ecfg.sidecar_title.html(label); + ecfg.sidecar_editor_container.empty().append($ce_spinner.clone()); + setTimeout(function(){ + if (ecfg.sidecar_container.hasClass("ce_editor_sidecar_autohide_on")) { + ecfg.sidecar_container.css({transform: "translateY(0)", opacity: "1"}); + } + }, 100); + ecfg.sidecar_autohide.css({"border-left-width":"1px"}); + return ecfg; + } + + function updateSidecarAsEditor(ecfg, contents) { + ecfg.sidecar_editor_container.empty(); + // The monaco URL must be unique or it will silently close. We use the same file when running different versions of btool and in other circumstances so need to prefix with a unique id. + var url = "T" + (tabCreationCount++) + "/" + ecfg.file; + ecfg.sidecar_model = monaco.editor.createModel(contents, "plaintext", monaco.Uri.file(url)); + + var options = { + automaticLayout: true, + model: ecfg.sidecar_model, + minimap: { + enabled: false + }, + lineNumbers: 'off', + wordWrap: 'on', + folding: false, + lineDecorationsWidth: 0, + lineNumbersMinChars: 0, + glyphMargin: false, + hover: { delay: 700 } + }; + ecfg.sidecar_editor = monaco.editor.create(ecfg.sidecar_editor_container[0], options); + //ecfg.server_content = ecfg.editor.getValue(); + var autohideTimeout = setTimeout(function(){ + if (ecfg.sidecar_container.hasClass("ce_editor_sidecar_autohide_on")) { + ecfg.sidecar_container.css({transform: "translateY(" + (ecfg.sidecar_container.height() - 35) + "px)"}); + } + ecfg.sidecar_autohide.css({"border-left-color":"transparent", "border-left-width":"1px"}); + },5000); + setTimeout(function(){ + ecfg.sidecar_autohide.css({"border-left-width":(ecfg.sidecar_container.width() - 4) + "px", "border-left-color":"rgba(255,255,255,0.5)"}); + }, 10); + if (ecfg.sidecar_container.hasClass("ce_editor_sidecar_autohide_on")) { + ecfg.sidecar_container.css({transform: "translateY(0)"}); + } + ecfg.sidecar_editor.onMouseDown(function(e) { + clearTimeout(autohideTimeout); + ecfg.sidecar_autohide.css({"border-left-color":"transparent", "border-left-width":"1px"}); + }); + } + + function createTab(type, file, label){ + var ecfg = { + type: type, + file: file, + label: type + ": " + file, + id: tabid++ + }; + editors.push(ecfg); + ecfg.tab_container = $("
").appendTo($ce_contents); + ecfg.editor_container = $("
").appendTo(ecfg.tab_container); + ecfg.editor_container.append($ce_spinner.clone()); + // Remove the "restore session" link + $(".ce_restore_session").remove(); + ecfg.tab = $("
" + label + "
").attr("title", ecfg.label).data({"tab": ecfg}).appendTo($ce_tabs); + ecfg.hasChanges = false; + ecfg.server_content = ''; + activateTab(editors.length-1); + openTabsListChanged(); + return ecfg; + } + + function addHookActionToEditor(hook, ecfg) { + if (hook._match.test(ecfg.file) && hook.matchtype == "file" && ! (hook.hasOwnProperty("showInPane") && hook.showInPane === "tree")) { + var lab = replaceTokens(hook.label, ecfg.file); + if (isTrueValue(hook.showWithSave) && ecfg.canBeSavedFile) { + ecfg.editor.addAction({ + id: "Save and " + lab, + contextMenuOrder: 0.2, + contextMenuGroupId: 'navigation', + label: "Save and " + lab, + run: function() { + saveActiveTab(function(){ + runAction(hook.action, ecfg.file, true); + }); + } + }); + } + + ecfg.editor.addAction({ + id: lab, + contextMenuOrder: 0.3, + contextMenuGroupId: 'navigation', + label: lab, + run: function() { + runAction(hook.action, ecfg.file, true); + } + }); + } + } + + function updateTabAsEditor(ecfg, contents, language) { + // uses the built-in language detection where possible + if (! language) { + if (/\.(?:conf|meta|spec)/.test(ecfg.file)) { + language = "ini"; + } + } + var re = /([^\/\\]+).conf$/; + var found = ecfg.file.match(re); + ecfg.canBeSavedFile = (ecfg.type === "read" || ecfg.type === "settings"); + ecfg.canBeSavedRest = (ecfg.type === "rest"); + if (found && ecfg.canBeSavedFile && found[1] !== 'app') { + ecfg.matchedConf = found[1]; + } else if (ecfg.type === "settings"){ + ecfg.matchedConf = "config_explorer"; + } + if (ecfg.canBeSavedFile || ecfg.canBeSavedRest) { + // Start the process of checking filemodtimes + // A filemodcheck might be about to occur, but delay it another 100ms in case its the first load a bunch of tabs are opening at once. + clearTimeout(fileModsCheckTimer); + fileModsCheckTimer = setTimeout(function(){ checkFileMods(); }, 100); + } + ecfg.saving = false; + ecfg.decorations = []; + ecfg.editor_container.empty(); + // The monaco URL must be unique or it will silently close. We use the same file when running different versions of btool and in other circumstances so need to prefix with a unique id. + var url = "T" + (tabCreationCount++) + "/" + ecfg.file; + ecfg.model = monaco.editor.createModel(contents, language, monaco.Uri.file(url)); + // Default things to be ini syntax highlighting rather than none + if (ecfg.model.getModeId() === "plaintext" && ! language) { + monaco.editor.setModelLanguage(ecfg.model, "ini"); + } + var options = $.extend({}, preferences, { + automaticLayout: true, + model: ecfg.model, + lineNumbersMinChars: 3, + ariaLabel: ecfg.file, + //readOnly: ! ecfg.canBeSavedFile, + glyphMargin: true, + hover: { delay: 700 } + }); + ecfg.editor = monaco.editor.create(ecfg.editor_container[0], options); + ecfg.server_content = ecfg.editor.getValue(); + + // check if we need to scroll to a particular location and highlight a line + if (doLineHighlight !== "") { + var line_nums = doLineHighlight.split(","); + //console.log(doLineHighlight, line_nums); + if (line_nums.length > 1) { + ecfg.editor.setSelection(new monaco.Selection(Number(line_nums[0]),1,(Number(line_nums[1]) + 1),1)); + ecfg.editor.revealLineInCenter(Number(line_nums[0]), 0); + ecfg.editor.focus(); + } + doLineHighlight = ""; + } + + if (ecfg.canBeSavedFile || ecfg.canBeSavedRest) { + ecfg.editor.onDidChangeModelContent(function() { + // check against saved copy + if (ecfg.editor.getValue() !== ecfg.server_content) { + if (!ecfg.hasChanges) { + ecfg.tab.append(""); + ecfg.hasChanges = true; + } + } else { + if (ecfg.hasChanges) { + ecfg.tab.find('.icon-alert-circle').remove(); + ecfg.hasChanges = false; + } + } + // Turn off the glyphs until next save + ecfg.decorations = ecfg.editor.deltaDecorations(ecfg.decorations, []); + }); + } + ecfg.editor.addAction({ + id: 'prev-tab', + label: 'Switch tab to left of current', + keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.LeftArrow], + run: function() { + if (editors.length > 1) { + activateTab((activeTab === 0) ? editors.length - 1 : activeTab - 1); + } + return null; + } + }); + ecfg.editor.addAction({ + id: 'next-tab', + label: 'Switch tab to right of current', + keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.RightArrow], + run: function() { + if (editors.length > 1) { + activateTab((activeTab === editors.length - 1) ? 0 : activeTab + 1); + } + return null; + } + }); + ecfg.editor.addAction({ + id: 'last-used-tab', + label: 'Switch tab to last active', + keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.UpArrow], + run: function() { + var last_used_idx, + newest; + if (editors.length > 1) { + for (var i = 0; i < editors.length; i++){ + if (activeTab !== i) { + if (! newest || newest < editors[i].last_opened) { + newest = editors[i].last_opened; + last_used_idx = i; + } + } + } + activateTab(last_used_idx); + } + return null; + } + }); + ecfg.editor.addAction({ + id: 'close-tab', + label: 'Close tab', + keybindings: [monaco.KeyMod.Alt | monaco.KeyMod.Shift | monaco.KeyCode.KEY_W], + run: function() { + closeTabByCfg(ecfg); + return null; + } + }); + if (ecfg.canBeSavedFile || ecfg.canBeSavedRest) { + ecfg.editor.addAction({ + id: 'save-file', + contextMenuOrder: 0.1, + contextMenuGroupId: 'navigation', + label: 'Save file', + run: function() { + saveActiveTab(); + } + }); + } + if (ecfg.canBeSavedFile) { + ecfg.editor.addAction({ + id: 'save-file-action', + contextMenuOrder: 1, + contextMenuGroupId: '99_prefs', + label: 'Set post-save action', + run: function() { + setPostSaveAction(); + } + }); + } + if (ecfg.canBeSavedFile) { + ecfg.editor.addAction({ + id: 'link-to-highlight', + contextMenuOrder: 3, + contextMenuGroupId: '99_prefs', + label: 'Create link to line/selection', + run: function() { + var editor_selection = ecfg.editor.getSelection(); + var hashparts = window.location.href.replace(/#.*/,"") + "#0|" + inFolder + "|" + ecfg.type + "|" + ecfg.file + "@" + editor_selection.startLineNumber + "," + editor_selection.endLineNumber; + console.log(hashparts); + copyTextToClipboard(hashparts); + } + }); + } + if (ecfg.type !== "rest") { + ecfg.editor.addAction({ + id: 'attempt-open-file', + contextMenuOrder: 0.4, + contextMenuGroupId: 'navigation', + label: 'Attempt open', + run: function(ed) { + var position = ed.getPosition(); + var text = ed.getValue(position); + var splitedText=text.split("\n"); + var line = splitedText[position.lineNumber-1]; + var replace = "(.{" + position.column + "}[^\\s\'\":]+).*"; + var re = new RegExp(replace,"g"); + var filename_string = line.replace(re, "$1"); + filename_string = filename_string.replace(/.*[\s\"\']/,""); + if (filename_string.length <= 3) { + showModal({ + title: "Warning", + body: "
Use the 'Attempt Open' menu option on editor text for a file/folder path
", + size: 350 + }); + return; + } + var proposedPaths = {}; + // we check a few different ways of finding a legitimate path from the highlighted text + proposedPaths[dodgyRemoveRelPath(filename_string)] = 2; + // when looking in etc/ it needs to be 3 folders deep + proposedPaths["etc/" + dodgyRemoveRelPath(filename_string)] = 3; + // if its a "run" editor tab, then the fromFolder will be set. + if (ecfg.hasOwnProperty("fromFolder")) { + proposedPaths[dodgyRemoveRelPath(ecfg.fromFolder + "/" + filename_string)] = 2; + } else { + proposedPaths[dodgyRemoveRelPath(dodgyDirname(ecfg.file) + filename_string)] = 2; + } + var success = false; + var errorFunction = function(){ + showModal({ + title: "Warning", + body: "
Unable to find file or folder path to open: " + htmlEncode(filename_string) + "

(Looked in $SPLUNK_HOME, $SPLUNK_HOME/etc and relative to current file)
", + size: 450 + }); + }; + for (var proposedPath in proposedPaths) { + if (proposedPaths.hasOwnProperty(proposedPath)) { + //console.log("attempting path ==> " + proposedPath); + if (filecache !== null) { + // we only check if the first 2 parts of the path are legit. If the path is less than two folders deep, then it wont open + var base = getTreeCache("./" + proposedPath, 1 + proposedPaths[proposedPath]); + //console.log("checking file cache for path ", "./" + proposedPath, ":", filecache, base); + if (base !== null) { + // this doesnt handle the case where its a bare folder with no trailing slash, but its good enough + if (proposedPath.slice(-1) === "/") { + readFolder("./" + proposedPath); + } else { + readFile("./" + proposedPath, errorFunction); + } + success = true; + break; + } + } + } + } + if (!success) { + errorFunction(); + } + } + }); + } + ecfg.editor.addAction({ + id: 'open-prefs-action', + contextMenuOrder: 2, + contextMenuGroupId: '99_prefs', + label: 'Preferences', + run: function() { + openPreferences(); + } + }); + if (ecfg.type === "settings") { + ecfg.editor.addAction({ + id: "settings_spec", + contextMenuOrder: 0.3, + contextMenuGroupId: 'navigation', + label: "Open documentation (.spec file)", + run: function() { + runAction("spec:config_explorer.conf", "", true); + } + }); + ecfg.editor.addAction({ + id: "settings_examples", + contextMenuOrder: 0.3, + contextMenuGroupId: 'navigation', + label: "Show default config", + run: function() { + runAction("read:./etc/apps/config_explorer/default/config_explorer.conf", "", true); + } + }); + } + if (ecfg.type === "read") { + for (var j = 0; j < hooksActive.length; j++) { + var hook = hooksActive[j]; + addHookActionToEditor(hook, ecfg); + } + } + if (ecfg.type === "read") { + ecfg.editor.addAction({ + id: 'reload', + contextMenuOrder: 0.2, + contextMenuGroupId: 'navigation', + label: 'Reload from disk', + run: function() { + closeTabByCfg(ecfg); + hooksCfg[ecfg.type](ecfg.file, ecfg.fromFolder); + } + }); + ecfg.editor.addAction({ + id: 'editorchanges', + contextMenuOrder: 0.3, + contextMenuGroupId: 'navigation', + label: 'Diff unsaved changes', + run: function() { + openDiffOfUnsavedChanges(ecfg); + } + }); + + // If this is an XML file, provide an option to try opening it + // warning: There are plenty of situations where this wont work, becuase of permissions layering etc + if (confIsTrue('dashboard_xml_file_experimental_actions', false)) { + var file_parts_for_openurl = ecfg.file.match(regex_file_path_to_dashboard_parts); + if (file_parts_for_openurl) { + ecfg.editor.addAction({ + id: 'opendashboard', + contextMenuOrder: 0.31, + contextMenuGroupId: 'navigation', + label: 'Attempt view in browser', + run: function() { + hooksCfg.openurl("/app/" + file_parts_for_openurl[2] + "/" + file_parts_for_openurl[3]); + } + }); + ecfg.editor.addAction({ + id: 'editrestdashboard', + contextMenuOrder: 0.32, + contextMenuGroupId: 'navigation', + label: 'Attempt edit via REST API', + run: function() { + if (file_parts_for_openurl[1]=="apps") { + hooksCfg.rest("/servicesNS/nobody/" + file_parts_for_openurl[2] + "/data/ui/views/" + file_parts_for_openurl[3]); + } else { + hooksCfg.rest("/servicesNS/" + file_parts_for_openurl[1].substr(6) + "/" + file_parts_for_openurl[2] + "/data/ui/views/" + file_parts_for_openurl[3]); + } + } + }); + } + } + + } + if (ecfg.type === "rest") { + // reload rest + ecfg.editor.addAction({ + id: 'reload', + contextMenuOrder: 0.2, + contextMenuGroupId: 'navigation', + label: 'Reload from REST API', + run: function() { + closeTabByCfg(ecfg); + hooksCfg.rest(ecfg.file); + } + }); + var file_parts_for_openurl_rest = ecfg.file.match(/([^\/]+)\/data\/ui\/views\/(.*)$/); + if (file_parts_for_openurl_rest) { + ecfg.editor.addAction({ + id: 'opendashboard', + contextMenuOrder: 0.31, + contextMenuGroupId: 'navigation', + label: 'Attempt view in browser', + run: function() { + hooksCfg.openurl("/app/" + file_parts_for_openurl_rest[1] + "/" + file_parts_for_openurl_rest[2]); + } + }); + } + } + // Add a right-click option + if (tabCfg[ecfg.type].can_rerun) { + ecfg.editor.addAction({ + id: 'rerun', + contextMenuOrder: 0.1, + contextMenuGroupId: 'navigation', + label: 'Rerun', + run: function() { + closeTabByCfg(ecfg); + hooksCfg[ecfg.type](ecfg.file, ecfg.fromFolder); + } + }); + } + openTabsListChanged(); + ecfg.tab.trigger("ce_loaded"); + } + + function openDiffOfUnsavedChanges(ecfg) { + var ecfgDiff = createTab('diff', ecfg.file, "diff: " + ecfg.file); + var saved_value = ecfg.editor.getValue(); + serverActionWithoutFlicker({action: 'read', path: ecfg.file}).then(function(contents){ + updateTabAsDiffer(ecfgDiff, ecfg.file + " (on disk)\n" + contents, "(Unsaved changes)\n" + saved_value); + }).catch(function(){ + closeTabByCfg(ecfgDiff); + }); + } + + function saveActiveTab(cb){ + var saved_value; + if (activeTab === null || activeTab === -1) { + return; + } + var ecfg = editors[activeTab]; + if (ecfg.canBeSavedFile) { + if (! ecfg.saving) { + /// Warn again if file has changed + var $warn_msg = ecfg.tab.find(".ce_modified_on_disk"); + if ($warn_msg.length > 0 && ! ecfg.modified_on_disk_ignored) { + showModal({ + title: "Warning", + body: "
" + $warn_msg.attr("title").replace(/\..*/,"") + "
", + size: 600, + actions: [{ + label: "Save anyway", + onClick: function(){ + $(".modal").modal('hide'); + // set a flag and resave + ecfg.modified_on_disk_ignored = true; + saveActiveTab(cb); + } + },{ + label: "Cancel and diff", + onClick: function(){ + $(".modal").modal('hide'); + openDiffOfUnsavedChanges(ecfg); + } + },{ + label: "Cancel", + onClick: function(){ $(".modal").modal('hide'); } + }] + }); + return; + } + saved_value = ecfg.editor.getValue(); + ecfg.saving = true; + ecfg.tab.append(""); + serverAction({action: 'save', path: ecfg.file, file: saved_value}).then(function(){ + // After file has been saved, delete its filemod time and get a new filemod time + delete ecfg.filemod; + // remove unsaved changes icon from tab + ecfg.tab.find('.ce_modified_on_disk').remove(); + ecfg.tab.css("color",""); + clearTimeout(fileModsCheckTimer); + fileModsCheckTimer = setTimeout(function(){ checkFileMods(); }, 100); + + ecfg.saving = false; + ecfg.modified_on_disk_ignored = false; + ecfg.tab.find('.ce_tab_saving_icon').remove(); + showToast('Saved'); + ecfg.server_content = saved_value; + ecfg.tab.find('.icon-alert-circle').remove(); + ecfg.hasChanges = false; + highlightBadConfig(ecfg); + if (ecfg.file === "") { + loadPermissionsAndConfList(); + } + if (cb) { + cb(); + } + // Run any post-save hook + var p = getPostSave(ecfg.file); + if (p !== null) { + if (p[0] === "run" && ! approvedPostSaveHooks.hasOwnProperty(p[0] + "|" + p[1])) { + showModal({ + title: "Confirm post-save action ", + body: "
The following action is configured to run after every save:

" + htmlEncode(p[0]) + ":" + htmlEncode(p[1]) + "
", + size: 600, + actions: [{ + onClick: function(){ + $(".modal").modal('hide'); + approvedPostSaveHooks[p[0] + "|" + p[1]] = true; + runPostSaveAction(p); + }, + cssClass: 'btn-primary', + label: "Approve" + },{ + onClick: function(){ $(".modal").modal('hide'); }, + label: "Cancel" + }] + }); + } else { + runPostSaveAction(p); + } + } + }, function(){ + ecfg.saving = false; + ecfg.tab.find('.ce_tab_saving_icon').remove(); + }); + } + return null; + } else if (ecfg.canBeSavedRest) { + if (! ecfg.saving) { + saved_value = ecfg.editor.getValue(); + ecfg.saving = true; + ecfg.tab.append(""); + + service.post(ecfg.file, {"eai:data": saved_value}, function(err, r) { + if (err) { + if (err.data.hasOwnProperty('messages')) { + errText = "
" + htmlEncode(err.data.messages["0"].text) + "
"; + } else { + errText = "
" + htmlEncode(JSON.stringify(err)) + "
"; + } + showModal({ + title: "Warning", + body: "
Error while saving: " + errText + "
", + size: 500 + }); + console.log(err); + ecfg.saving = false; + ecfg.tab.find('.ce_tab_saving_icon').remove(); + } + if (r && r.data) { + //console.log("ok saving to rest", r.data); + ecfg.tab.find('.ce_modified_on_disk').remove(); + ecfg.tab.css("color",""); + clearTimeout(fileModsCheckTimer); + fileModsCheckTimer = setTimeout(function(){ checkFileMods(); }, 100); + + ecfg.saving = false; + ecfg.tab.find('.ce_tab_saving_icon').remove(); + showToast('Saved'); + ecfg.server_content = saved_value; + ecfg.tab.find('.icon-alert-circle').remove(); + ecfg.hasChanges = false; + + // send broadcast message: + broadcastChannel.postMessage({ + action:"saved", + type: ecfg.type, + path: ecfg.file + }); + + } else { + console.error("unexpected error when saving", r.data); + ecfg.saving = false; + ecfg.tab.find('.ce_tab_saving_icon').remove(); + showModal({ + title: "Warning", + body: "
Unpexpected error while saving!
", // err.data.messages["0"].text + size: 500 + }); + } + }); + } + return null; + } else { + showModal({ + title: "Warning", + body: "
This file cannot be saved
", + size: 300 + }); + } + } + + function runPostSaveAction(parts) { + closeTabByHookDetails(parts[0], parts[1]); + hooksCfg[parts[0]](parts[1], undefined, true); + } + + function updateTabHTML(ecfg, contents) { + ecfg.editor_container.html(contents).css("overflow", "auto"); + ecfg.tab.trigger("ce_loaded"); + } + + function updateTabAsDiffer(ecfg, left, right) { + var originalModel = monaco.editor.createModel(left); + var modifiedModel = monaco.editor.createModel(right); + ecfg.editor_container.empty(); + ecfg.editor = monaco.editor.createDiffEditor(ecfg.editor_container[0],{ + automaticLayout: true, + }); + ecfg.editor.setModel({ + original: originalModel, + modified: modifiedModel + }); + ecfg.tab.trigger("ce_loaded"); + + if (ecfg.hasOwnProperty("diffFileRight")) { + + ecfg.editor.addAction({ + id: 'updatediffer', + contextMenuOrder: 0.3, + contextMenuGroupId: 'navigation', + label: 'Rerun diff', + run: function() { + compareFiles(ecfg.diffFileRight, ecfg.diffFileLeft); + closeTabByCfg(ecfg); + } + }); + } + } + + // Make sure the server action that results in a tab open, takes a minimum amount of time so as not to flicker and look dumb + function serverActionWithoutFlicker(postData, customErrorCB) { + var promise = serverAction(postData, customErrorCB); + var promiseTimeout = new Promise(function(resolve) { + setTimeout(resolve, 800); + }); + var promiseCombined = Promise.all([promise, promiseTimeout]); + return promiseCombined.then(function(values) { + return values[0]; + }); + } + + // Make a rest call to our backend python script + function serverAction(postData, customErrorCB) { + //console.log("CBY SERVERACTION:", postData); + return new Promise(function(resolve, reject) { + inFlightRequests++; + $('.ce_saving_icon').removeClass('ce_hidden'); + //console.log(postData); + service.post('/services/config_explorer', postData, function(err, r) { + inFlightRequests--; + if (inFlightRequests === 0) { + $('.ce_saving_icon').addClass('ce_hidden'); + } + var errText = ''; + //console.log(err, r); + if (err) { + if (err.data.hasOwnProperty('messages')) { + errText = "
" + htmlEncode(err.data.messages["0"].text) + "
"; + } else { + errText = "
" + htmlEncode(JSON.stringify(err)) + "
"; + } + } else { + if (! r.data) { + errText = "
Error communicating with Splunk
"; + + } else if (! (r.data.hasOwnProperty('result') || r.data.hasOwnProperty('reason'))) { + errText = "
" + htmlEncode(r.data) + "
"; + + } else if (r.data.reason === "missing_perm_read") { + errText = "

To use this application you must be have the capability \"admin_all_objects\" via a role.

"; + + } else if (r.data.reason === "missing_perm_run") { + errText = "

You must enable the run_commands setting

"; + + } else if (r.data.reason === "missing_perm_write") { + errText = "

You must enable the write_access setting

"; + + } else if (r.data.reason === "config_locked") { + errText = "

Unable to write to the settings file becuase it is locked and must be edited externally: etc/apps/config_explorer/local/config_explorer.conf

"; + + } else if (r.data.reason === "binary_file") { + errText = "

Unable to open binary file (right-click and 'download' file instead)

"; + + } else if (r.data.reason !== "") { + errText = "
" + htmlEncode(r.data.reason) + "
"; + } + } + if (errText) { + // dont show the error for background requests such as filemods + if (postData.action !== "filemods") { + if (typeof customErrorCB === "undefined") { + showModal({ + title: "Error", + body: "
An error occurred!

" + htmlEncode(postData.action) + ": " + htmlEncode(postData.hasOwnProperty("path") ? postData.path : "") + "


" + errText + "
", + }); + } else { + customErrorCB(); + } + } + reject(Error("error")); + } else { + // if there was some unexpected git output, then open a window to display it + if (r.data.git && r.data.git_status !== -1) { + var git_autocommit_show_output = "auto"; + if (conf.hasOwnProperty("git_autocommit_show_output")) { + git_autocommit_show_output = conf.git_autocommit_show_output.toLowerCase(); + } + if (git_autocommit_show_output === "true" || (git_autocommit_show_output === "auto" && r.data.git_status > 0)) { + var git_output = "

"; + if (git_autocommit_show_output === "auto") { + git_output = "Warning: Unexpected return code when attempting to autocommit changes to version control. "; + } + git_output = "Git output is below:

"; + for (var j = 0; j < r.data.git.length; j++) { + git_output += "
" + htmlEncode($.trim(r.data.git[j].content)) + "
"; + } + var ecfg = createTab('git', '', 'git output'); + updateTabHTML(ecfg, "
" + git_output + "
"); + } + } + resolve(r.data.result); + } + }); + }); + } + + // Try to build a conf file from calling the rest services. turns out this is pretty unreliable. + function formatLikeRunningConfig(contents) { + return contents.replace(/^.+?splunk[\/\\]etc[\/\\].*?\.conf\s+(?:(.+) = (.*)|(\[.+))\r?\n/img,function(all, g1, g2, g3){ + if (g3 !== undefined) { return g3 + "\n"; } + if (g2.toLowerCase() == "true") { return g1 + " = 1\n";} + if (g2.toLowerCase() == "false") { return g1 + " = 0\n";} + return g1 + " = " + g2 + "\n"; + }); + } + + function adjustBtoolPaths(contents, inPath, outPath) { + return contents.replace(new RegExp(regexEscape(inPath) + "[\\/\\\\]apps[\\/\\\\]", 'g'), outPath); + } + + // Formats the output of "btool list" depending on what checkboxes are selected in the left pane + function formatBtoolList(contents, type) { + var indent = 80; + return contents.replace(/\\/g,'/').replace(/^.+?splunk[\/]etc[\/](.*?\.conf)\s+(.+)(\r?\n)/img,function(all, g1, g2, g3){ + var path = ''; + // I am pretty sure that stanzas cant be set to default when containing a child that isnt + if (type === "btool-hidesystemdefaults" && /system[\/\\]default[\/\\]/.test(g1)) { + return ''; + } + if (type === "btool-hidedefaults" && /[\/\\]default[\/\\]/.test(g1)) { + return ''; + } + if (type !== "btool-hidepaths") { + path = (" ".repeat(Math.max(1, (indent - g2.length)))) + " " + g1; + } + return g2 + path + g3; + }); + } + + function addGutter(newdecorations, i, className, message) { + newdecorations.push({ range: new monaco.Range((1+i),1,(1+i),1), options: { isWholeLine: true, glyphMarginClassName: className, glyphMarginHoverMessage: [{value: message }] }}); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + + // After loading a .conf file or after saving and before any changes are made, red or green colour will + // be shown in the gutter about if the current line can be found in the output of btool list. + function highlightBadConfig(ecfg){ + if (! confIsTrue('conf_validate_on_save', true)) { + return; + } + if (! ecfg.hasOwnProperty('matchedConf') || ecfg.file === "") { + return; + } + if (conf._conf_validate_on_save_exclusions.test(ecfg.matchedConf)) { + console.log("Not doing btool validation in code gutter for [" + ecfg.matchedConf + "] becuase it matches conf_validate_on_save_exclusions."); + return; + } + var run_path = ""; + var run_path_parts = ecfg.file.split(/[\/\\]/); + if (run_path_parts[0] === ".") { + run_path_parts.shift(); + } + if (run_path_parts.length > 1) { + run_path = run_path_parts[1]; + } + // console.log("runpath is ",run_path); + // possible locations you can run btool: etc/master-apps, etc/slave-apps, etc/apps, etc/system/local, etc/user, etc/shcluster/apps + // can also run btool on slave-apps, but who has config explorer installed on an indexer anyway? + if (run_path === "apps" || run_path === "system") { + serverAction({action: 'btool-list', path: ecfg.matchedConf}).then(function(btoolcontents){ + highlightBadConfigContinue(ecfg, btoolcontents, run_path); + }); + + } else if (run_path === "deployment-apps" && conf.btool_dir_for_deployment_apps) { + serverAction({action: 'btool-list', path: ecfg.matchedConf, param1: conf.btool_dir_for_deployment_apps}).then(function(btoolcontents){ + if (btoolcontents) { + // nix only paths. this feature wont work with win becuase you cant symlink + var btoolcontents2 = adjustBtoolPaths(btoolcontents, conf.btool_dir_for_deployment_apps, "/splunk/etc/deployment-apps/"); + if (btoolcontents2 !== btoolcontents) { + highlightBadConfigContinue(ecfg, btoolcontents2, run_path); + return; + } + } + highlightBadConfigContinue(ecfg, "", run_path); + }); + + } else if (run_path === "master-apps" && conf.btool_dir_for_master_apps) { + serverAction({action: 'btool-list', path: ecfg.matchedConf, param1: conf.btool_dir_for_master_apps}).then(function(btoolcontents){ + if (btoolcontents) { + var btoolcontents2 = adjustBtoolPaths(btoolcontents, conf.btool_dir_for_master_apps, "/splunk/etc/master-apps/"); + // if the replace did nothing, then the btool gutters are probably going to be all wrong anyway + if (btoolcontents2 !== btoolcontents) { + highlightBadConfigContinue(ecfg, btoolcontents2, run_path); + return; + } + } + highlightBadConfigContinue(ecfg, "", run_path); + }); + + } else if (run_path === "manager-apps" && conf.btool_dir_for_manager_apps) { + serverAction({action: 'btool-list', path: ecfg.matchedConf, param1: conf.btool_dir_for_manager_apps}).then(function(btoolcontents){ + if (btoolcontents) { + var btoolcontents2 = adjustBtoolPaths(btoolcontents, conf.btool_dir_for_manager_apps, "/splunk/etc/manager-apps/"); + // if the replace did nothing, then the btool gutters are probably going to be all wrong anyway + if (btoolcontents2 !== btoolcontents) { + highlightBadConfigContinue(ecfg, btoolcontents2, run_path); + return; + } + } + highlightBadConfigContinue(ecfg, "", run_path); + }); + + } else if (run_path === "shcluster" && conf.btool_dir_for_shcluster_apps) { + serverAction({action: 'btool-list', path: ecfg.matchedConf, param1: conf.btool_dir_for_shcluster_apps}).then(function(btoolcontents){ + //console.log("btoolcontents",btoolcontents); + highlightBadConfigContinue(ecfg, btoolcontents, run_path); + }); + + } else { + highlightBadConfigContinue(ecfg, "", run_path); + } + } + + function highlightBadConfigContinue(ecfg, btoolcontents, run_path){ + var rexSplunkHome = /^(.+?)[\\\/]etc[\\\/]/; + var foundSplunkHome; + var lookup = {}; + var splunk_home = ""; + var seenStanzas = {}; + var seenProps = {}; + var normalBtoolChecks = true; + var masterappsPropsTransformsChecks = false; + var masterappsPropsSourcetypeChecks = false; + var allConfigsAreUnnecisary = false; + + // There is some special logic if we are in the master-apps directory + if (run_path === "master-apps" || run_path === "manager-apps") { + if (conf.hasOwnProperty("_master_apps_gutter_useful_props_and_transforms") && (ecfg.matchedConf === "props" || ecfg.matchedConf === "transforms")) { + masterappsPropsTransformsChecks = true; + } + // split the master_apps_allowed_config by commas, then split each by full colon. ecfg.matchedConf + if (conf.hasOwnProperty("_master_apps_gutter_used_sourcetypes") && ecfg.matchedConf === "props") { + masterappsPropsSourcetypeChecks = true; + } + if (conf.hasOwnProperty("_master_apps_gutter_unnecissary_config_files") && conf._master_apps_gutter_unnecissary_config_files.test(ecfg.matchedConf)) { + allConfigsAreUnnecisary = true; + } + } + + + if (! $.trim(btoolcontents)) { + console.log("no btool contents for ", ecfg.matchedConf); + normalBtoolChecks = false; + } + + //console.log("hinting file for [" + ecfg.matchedConf + "] is MB long: " + Math.round(btoolcontents.length / 1024) / 1024); + + if (normalBtoolChecks) { + btoolcontents = btoolcontents.replace(/\\/g,'/'); + // Build lookup of btool output + lookup = buildBadCodeLookup(btoolcontents); + if (debug_gutters) { + console.log("Btool:", lookup); + if (ecfg.hasOwnProperty('hinting')) { + console.log("Spec:", ecfg.hinting); + } + } + // try to figure out the SPLUNK_HOME value + // Its common that in inputs.conf, some stanzas are defined with $SPLUNK_HOME which btool always expands + foundSplunkHome = btoolcontents.match(rexSplunkHome); + splunk_home = ""; + if (foundSplunkHome && foundSplunkHome.length == 2) { + splunk_home = foundSplunkHome[1]; + } + } + + // Go through everyline of the editor + var contents = ecfg.editor.getValue(), + rows = contents.split(/\r?\n/), + currentStanza = "", + currentStanzaTrimmed = "", + // This regex is complex becuase sometimes properties have a unique string on the end of them + // e.g "EVAL-src = whatever" + // found[1] will be "EVAL-src" + // found[2] will be "EVAL" + reProps = /^\s*((\w+)[^=\s]*)\s*=/, + newdecorations = [], + currentStanzaAsExpectedInBtool, + extraProp, + extraStanz; + for (var i = 0; i < rows.length; i++) { + if (rows[i].substr(0,1) === "[") { + if (rows[i].substr(0,9) === "[default]") { + currentStanza = ""; + } else { + currentStanza = $.trim(rows[i]); + } + currentStanzaTrimmed = currentStanza.replace(/^(\[\w+).*$/,"$1"); + // Stanzas that have $SPLUNK_HOME in them will be expanded by btool (stanzas in inputs.conf often have $SPLUNK_HOME in them) + currentStanzaAsExpectedInBtool = currentStanza.replace(/\$SPLUNK_HOME/i, splunk_home); + // Stanzas with windows path seperators are converted to unix seperators by btool + currentStanzaAsExpectedInBtool = currentStanzaAsExpectedInBtool.replace(/\\/g, '/'); + // Stanzas that use relative paths, will be expanded by btool. (e.g. inputs.conf [script://./bin/go.sh] from current script location) + currentStanzaAsExpectedInBtool = currentStanzaAsExpectedInBtool.replace(/\/\/\.\//, "//" + splunk_home + ecfg.file.substr(1).replace(/[^\/\\]*\/[^\/\\]*$/,'')); + + if (seenStanzas.hasOwnProperty(currentStanza)) { + addGutter(newdecorations, i, 'ceOrangeLine', "Duplicate Stanza in this file"); + } else if (masterappsPropsSourcetypeChecks) { + // This does does not work with source:: or host:: stanzas, or those that look like they might be a regular expression (not perfect) + if (! conf._master_apps_gutter_used_sourcetypes.test(currentStanza) && currentStanza.substr(0,9) !== "[source::" && currentStanza.substr(0,7) !== "[host::" && currentStanza.substr(0,2) !== "[(") { + addGutter(newdecorations, i, 'ceBlueLine', "This stanza \"" + currentStanza + "\" does not match a sourcetype in master_apps_gutter_used_sourcetypes (which is " + conf._master_apps_gutter_used_sourcetypes_date + " days old)"); + } + } else if (allConfigsAreUnnecisary) { + addGutter(newdecorations, i, 'ceBlueLine', "In most environments, the properties in this file are not needed on indexers."); + } + seenStanzas[currentStanza] = 1; + seenProps = {}; + } else { + var found = rows[i].match(reProps); + if (found) { + if (found[1].substr(0,1) !== "#") { + var g_sev = 2; + var g_messages = []; + var prop = found[1]; + // Check for duplicated key in stanza + if (seenProps.hasOwnProperty(found[1])) { + //addGutter(newdecorations, i, 'ceOrangeLine', "Duplicate key in stanza"); + g_sev = Math.max(g_sev, 5); + g_messages.push("Duplicate key in stanza"); + } else { + seenProps[found[1]] = 1; + + if (normalBtoolChecks) { + // Look if stanza/property exists in btool + if (! lookup.hasOwnProperty(currentStanzaAsExpectedInBtool)){ + //addGutter(newdecorations, i, 'ceRedLine', "Not found in \"btool\" output (btool does not list the stanza \"" + currentStanzaAsExpectedInBtool +"\")"); + g_sev = Math.max(g_sev, 6); + g_messages.push("Not found in \"btool\" output (btool does not list the stanza " + currentStanzaAsExpectedInBtool +")"); + + } else if (! lookup[currentStanzaAsExpectedInBtool].hasOwnProperty(found[1])){ + // [default] is a special case and is reflected through all other stanzas in the file + if (currentStanzaAsExpectedInBtool !== "") { + //addGutter(newdecorations, i, 'ceRedLine', "Not found in \"btool\" output (btool with stanza [" + currentStanzaAsExpectedInBtool +"] does not have property \"" + found[1] + "\")"); + g_sev = Math.max(g_sev, 6); + g_messages.push("Not found in \"btool\" output (could not find property in stanza " + currentStanzaAsExpectedInBtool +""); + } + + } else if (lookup[currentStanzaAsExpectedInBtool][found[1]] !== ecfg.file && lookup[currentStanzaAsExpectedInBtool][found[1]].substr(2) !== ecfg.file) { + //addGutter(newdecorations, i, 'ceRedLine', "Not found in \"btool\" output (set in :" + lookup[currentStanzaAsExpectedInBtool][found[1]] + ")"); + g_sev = Math.max(g_sev, 6); + g_messages.push("Not found in \"btool\" output (set in :" + lookup[currentStanzaAsExpectedInBtool][found[1]] + " and i am :" + ecfg.file + ")"); + + } else { + // addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output"); + g_messages.push("Found in \"btool\" output"); + } + } + + // If a spec file exists + if (ecfg.hasOwnProperty('hinting') && found.length > 2) { + // Look in the unstanzaed part of the spec + if (ecfg.hinting[""].hasOwnProperty(found[2])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"\" Property=\"" + found[2] + "\")"); + g_messages.push("Exists in spec file"); + prop = found[2]; + + // Look in the stanzaed part of the spec + } else if (ecfg.hinting.hasOwnProperty(currentStanza) && ecfg.hinting[currentStanza].hasOwnProperty(found[2])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"" + currentStanza + "\" Property=\"" + found[2] + "\")"); + g_messages.push("Exists in spec file (Stanza=" + currentStanza + ")"); + prop = found[2]; + + // Look for a trimmed version of the stanza in the spec. e.g. [endpoint:blah_rest] might be in the spec as [endpoint] + } else if (ecfg.hinting.hasOwnProperty(currentStanzaTrimmed) && ecfg.hinting[currentStanzaTrimmed].hasOwnProperty(found[2])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"" + currentStanzaTrimmed + "\" Property=\"" + found[2] + "\")"); + g_messages.push("Exists in spec file (Stanza=" + currentStanzaTrimmed + ")"); + prop = found[2]; + + // Now go through those same three checks, but look for the whole thing. For Example in web.conf found[2] is "tools" where as found[1] is "tools.sessions.timeout" + } else if (ecfg.hinting[""].hasOwnProperty(found[1])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"\" Property=\"" + found[1] + "\")"); + g_messages.push("Exists in spec file"); + + // Look in the stanzaed part of the spec + } else if (ecfg.hinting.hasOwnProperty(currentStanza) && ecfg.hinting[currentStanza].hasOwnProperty(found[1])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"" + currentStanza + "\" Property=\"" + found[1] + "\")"); + g_messages.push("Exists in spec file (Stanza=" + currentStanza + ")"); + + // Look for a trimmed version of the stanza in the spec. e.g. [endpoint:blah_rest] might be in the spec as [endpoint] + } else if (ecfg.hinting.hasOwnProperty(currentStanzaTrimmed) && ecfg.hinting[currentStanzaTrimmed].hasOwnProperty(found[1])) { + //addGutter(newdecorations, i, 'ceGreeenLine', "Found in \"btool\" output and spec file. (Stanza=\"" + currentStanzaTrimmed + "\" Property=\"" + found[1] + "\")"); + g_messages.push("Exists in spec file (Stanza=" + currentStanzaTrimmed + ")"); + + } else { + if (found[2] === found[1]) { + extraProp = "Looked for property "; + } else { + extraProp = "Looked for property (or \"" + found[2] + "\" "; + } + if (currentStanza === currentStanzaTrimmed) { + extraStanz = "in stanzas \"\" or " + currentStanza + ""; + } else { + extraStanz = "in stanzas \"\", " + currentStanza + " and " + currentStanzaTrimmed + ""; + } + //addGutter(newdecorations, i, 'ceDimGreeenLine', "Found in \"btool\" output, but not found in spec file. "+ extraProp + extraStanz); + g_sev = Math.max(g_sev, 3); + g_messages.push("Not found in spec file ("+ extraProp + extraStanz + ")"); + } + } + if (masterappsPropsTransformsChecks) { + if (! conf._master_apps_gutter_useful_props_and_transforms.test(found[2])) { + g_sev = Math.max(g_sev, 4); + g_messages.push("In most environments, this property is not needed on indexers (there is no harm in having it there though)."); + } + } + if (allConfigsAreUnnecisary) { + g_sev = Math.max(g_sev, 4); + g_messages.push("In most environments, the properties in this file are not needed on indexers."); + } + } + // add gutters now + if (g_messages.length) { + var g_color = g_sev == 6 ? "ceRedLine" : g_sev == 5 ? "ceOrangeLine" : g_sev == 4 ? "ceBlueLine" : g_sev == 3 ? "ceDimGreeenLine" : "ceGreeenLine"; + addGutter(newdecorations, i, g_color, "`" + prop + "`: " + g_messages.join(". ")); + } + } + } + } + } + ecfg.decorations = ecfg.editor.deltaDecorations(ecfg.decorations, newdecorations); + } + + // The bad code lookup builds a structure of the btool list output so it can be quickly referenced to see what config + // from the current editor is being recognised by btool or not. + function buildBadCodeLookup(contents){ + //(conf file path)(property)(stanza) + var rex = /^.+?splunk([\/\\]etc[\/\\].*?\.conf)\s+(?:([^=\s\[]+)\s*=|(\[[^\]]+\]))/gim; + var res; + var currentStanza = ""; + var currentField = ""; + var ret = {"": {"":""}}; + while(res = rex.exec(contents)) { + if (res[2]) { + currentField = res[2]; + ret[currentStanza][currentField] = '.' + res[1]; + } else if (res[3]) { + if (res[3].substr(0,9) === "[default]") { + currentStanza = ""; + } else { + currentStanza = res[3]; + } + currentField = ""; + ret[currentStanza] = {"":""}; // dont care about stanzas and where they come from + } //else { + //console.log("unexpected row:", res[0]); + //} + } + return ret; + } + + // parse the spec file and build a lookup to use for code completion + function buildHintingLookup(conf, contents){ + // left side is for properties, right size for stanzas + var rex = /^(?:([\w\.]+).*=|(\[\w+))?.*$/gm; + var res; + var currentStanza = ""; + var currentField = ""; + confFiles[conf] = {"": {"":{t:"", c:""}}}; + while(res = rex.exec(contents)) { + // need this because our rex can match a zero length string + if (res.index == rex.lastIndex) { + rex.lastIndex++; + } + if (res[1] || res[2]) { + if (res[1]) { + currentField = res[1]; + confFiles[conf][currentStanza][currentField] = {t:"", c:""}; + } else { + if (res[2].substr(0,9) === "[default]") { + currentStanza = ""; + } else { + currentStanza = res[2]; + } + currentField = ""; + if (! confFiles[conf].hasOwnProperty(currentStanza)) { + confFiles[conf][currentStanza] = {"":{t:"", c:""}}; + } + } + confFiles[conf][currentStanza][currentField].t = res[0]; + } else { + confFiles[conf][currentStanza][currentField].c += res[0] + "\n"; + } + } + return confFiles[conf]; + } + + // When hovering lines in a .conf file, Monaco will lookup the current property in the README/*.conf.spec files. + // Becuase the README/*.conf.spec files are not perfect, neither is this documentation! + monaco.languages.registerHoverProvider('ini', { + provideHover: function(model, position, token) { + return new Promise(function(resolve, reject) { + // do somthing + if (editors[activeTab].hasOwnProperty('hinting')) { + // get all text up to hovered line becuase we need to find what stanza we are in + var contents = model.getValueInRange(new monaco.Range(1, 1, position.lineNumber, model.getLineMaxColumn(position.lineNumber))); + var rex = /^(?:([\w\.]+)|(\[\w+))?.*$/gm; + var currentStanza = ""; + var currentField = ""; + var hintdata; + var res; + while(res = rex.exec(contents)) { + // need this because our rex can match a zero length string + if (res.index == rex.lastIndex) { + rex.lastIndex++; + } + if (res[1]) { + currentField = res[1]; + } else if (res[2]) { + if (res[2].substr(0,9) === "[default]") { + currentStanza = ""; + } else { + currentStanza = res[2]; + } + currentField = ""; + } + } + if (editors[activeTab].hinting.hasOwnProperty(currentStanza) && editors[activeTab].hinting[currentStanza].hasOwnProperty(currentField)) { + hintdata = editors[activeTab].hinting[currentStanza][currentField]; + + } else if (editors[activeTab].hinting[""].hasOwnProperty(currentField)) { + hintdata = editors[activeTab].hinting[""][currentField]; + + } else { + resolve(); + return; + } + resolve({ + // This is what will be highlighted + range: new monaco.Range(position.lineNumber, 1, position.lineNumber, model.getLineMaxColumn(position.lineNumber)), + contents: [ + { value: '**' + hintdata.t + '**' }, + { value: '\n' + hintdata.c.replace(/^#/mg,'') + '\n' } + ] + }); + } else { + resolve(); + } + }); + } + }); + + // When hitting CTRL-SPACE in .conf files, monaco will suggest all valid keys - with doco! + // Becuase the README/*.conf.spec files are not perfect, neither is this hinting! + monaco.languages.registerCompletionItemProvider('ini', { + provideCompletionItems: function(model, position) { + if (editors[activeTab].hasOwnProperty('hinting')) { + // get all text up to hovered line becuase we need to find what stanza we are in + var contents = model.getValueInRange(new monaco.Range(1, 1, position.lineNumber, model.getLineMaxColumn(position.lineNumber))); + var ret = []; + var rex = /[\s\S]*\n\s*(\[\w+)/; + var currentStanza = ""; + var found = contents.match(rex); + if (found && editors[activeTab].hinting.hasOwnProperty(found[1])) { + if (found[1].substr(0,9) === "[default]") { + currentStanza = ""; + } else { + currentStanza = found[1]; + } + } + for (var key in editors[activeTab].hinting[currentStanza]) { + if (editors[activeTab].hinting[currentStanza].hasOwnProperty(key) && key) { + ret.push({ + label: key, + insertText: key + " = ", + kind: monaco.languages.CompletionItemKind.Property, + documentation: "" + editors[activeTab].hinting[currentStanza][key].t + "\n\n" + editors[activeTab].hinting[currentStanza][key].c + "\n", + }); + } + } + return { suggestions: ret }; + } + return { suggestions: [] }; + } + }); + + // Register a new simple language for prettying up git diffs + monaco.languages.register({ id: 'git-diff' }); + monaco.languages.setMonarchTokensProvider('git-diff', { + tokenizer: { + root: [ + [/^diff.*/, "constant"], + [/^\+[^\n]*/, "comment"], // additions + [/^\-[^\n]*/, "metatag"], // deletions + [/^@@.+?@@/, "regexp"], + [/^\w[^\n]+/, "white"], + [/\s[^\n]+/, "delimiter.xml"], // other lines + ] + } + }); + + // Register a new simple language for prettying up git log + monaco.languages.register({ id: 'git-log' }); + monaco.languages.setMonarchTokensProvider('git-log', { + tokenizer: { + root: [ + [/^(commit|Author:|Date:)[^\n]+/, "constant"], // additions + [/(?:\++(?=[\-\s]*$)|\(\+\))/, "comment"], // plus (?:\++(?=[\-\s]*$)|(?<=\()\+(?=\))) + [/(?:(\-+)\s*$|\(\-\))/, "metatag"], // minus (?:(\-+)\s*$|(?<=\()\-(?=\))) + ] + } + }); + // dubious + function dodgyBasename(f) { + return f.replace(/.*[\/\\]/,''); + } + + function dodgyDirname(f) { + return f.replace(/[^\/\\]*$/,''); + } + + function dodgyRemoveRelPath(f) { + return f.replace(/^\.?[\/\\]/,''); + } + + //create a in-memory div, set it's inner text(which jQuery automatically encodes) + //then grab the encoded contents back out. The div never exists on the page. + function htmlEncode(value){ + return $('
').text(value).html(); + } + + function escapeRegExp(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + } + + function confIsTrue(param, defaultValue) { + if (!conf.hasOwnProperty(param)) { + return defaultValue; + } + return isTrueValue(conf[param]); + } + + function isTrueValue(param) { + return (["1", "true", "yes", "t", "y"].indexOf($.trim(param.toLowerCase())) > -1); + } + + function copyTextToClipboard(text) { + if (!navigator.clipboard) { + fallbackCopyTextToClipboard(text); + } else { + navigator.clipboard.writeText(text).then(function() { + showToast('Copied to clipboard!'); + }, function (err) { + console.error('Async: Could not copy to clipboard.', err); + }); + } + } + + function fallbackCopyTextToClipboard(text) { + var textArea = document.createElement("textarea"); + textArea.value = text; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + try { + var successful = document.execCommand('copy'); + if (successful) { + showToast('Copied to clipboard!'); + } else { + console.error('Fallback2: Could not copy to clipboard.'); + } + } catch (err) { + console.error('Fallback: Could not copy to clipboard.', err); + } + document.body.removeChild(textArea); + } + + function showToast(message) { + var t = $('.ce_toaster'); + t.find('span').text(message); + t.addClass('ce_show'); + setTimeout(function(){ + t.removeClass('ce_show'); + },3000); + } + + var showModal = function self(o) { + var options = $.extend({ + title : '', + body : '', + remote : false, + backdrop : true, + size : 500, + onShow : false, + onHide : false, + actions : false + }, o); + self.onShow = typeof options.onShow == 'function' ? options.onShow : function () {}; + self.onHide = typeof options.onHide == 'function' ? options.onHide : function () {}; + if (self.$modal === undefined) { + self.$modal = $('').appendTo('body'); + self.$modal.on('shown.bs.modal', function (e) { + self.onShow.call(this, e); + }); + self.$modal.on('hidden.bs.modal', function (e) { + self.onHide.call(this, e); + }); + } + self.$modal.css({'width': options.size + "px", 'margin-left': -1 * (options.size / 2) + "px"}); + self.$modal.data('bs.modal', false); + self.$modal.find('.modal-dialog').removeClass().addClass('modal-dialog '); + self.$modal.find('.modal-content').html(''.replace('${title}', options.title).replace('${body}', options.body)); + + var footer = self.$modal.find('.modal-footer'); + if (Object.prototype.toString.call(options.actions) == "[object Array]") { + for (var i = 0, l = options.actions.length; i < l; i++) { + options.actions[i].onClick = typeof options.actions[i].onClick == 'function' ? options.actions[i].onClick : function () {}; + $('').appendTo(footer).on('click', options.actions[i].onClick); + } + } else { + $('').appendTo(footer); + } + self.$modal.modal(options); + }; + + // "vs" | "vs-dark" (default) | "hc-black" + function setThemeMode(mode){ + // Remove existing theme class from parent + $dashboard_body.removeClass(function (index, className) { + return (className.match (/(^|\s)ce_theme_\S+/g) || []).join(' '); + }); + $dashboard_body.addClass("ce_theme_" + mode); + // Set theme for editors + monaco.editor.setTheme(mode); + // save to local storage + localStorage.setItem('ce_theme', mode); + } + + function checkFileMods() { + var files = {}; + var problems = []; + var hasFiles = false; + var ecfg; + // check if change detection is disabled + if (!confIsTrue('detect_changed_files', true)) { + return; + } + clearTimeout(fileModsCheckTimer); + fileModsCheckTimer = setTimeout(checkFileMods, fileModsCheckTimerPeriod); + + if (fileModsCheckTimerInProgress) { + return; + } + + // if current focused tab is "rest" then check it to see if it has changed + if (activeTab > 0 && editors[activeTab].type === "rest") { + ecfg = editors[activeTab]; + if (ecfg.tab.find(".ce_modified_on_disk").length === 0 ) { + //console.log("check for REST changes in ", ecfg); + fileModsCheckTimerInProgress = true; + + getRest(ecfg.file, null).then(function(restData) { + fileModsCheckTimerInProgress = false; + //console.log(restData); //?output_mode=json&count=0&f=title&f=label + if (restData.length === 0) { + ecfg.tab.css("color","orange").append(""); + showModal({ + title: "Warning", + body: "
Warning: Unable to check for changes. File might have been deleted, moved or had its permissions changed.

" + htmlEncode(ecfg.file) + "
", + size: 600 + }); + } else if (restData.length === 1) { + if (ecfg.server_content !== restData[0].content['eai:data']) { + ecfg.tab.css("color","orange").append(""); + showModal({ + title: "Warning", + body: "
Warning: File has unexpectedly changed while open.

" + htmlEncode(ecfg.file) + "
", + size: 600 + }); + } + } else { + console.error("Unexpeted response when checking if rest dashboard contents has changed while open - returned dashboards: " + restData.length); + } + + }).catch(function(){ + fileModsCheckTimerInProgress = false; + console.error("Unexpeted response when checking if rest dashboard contents has changed while open"); + }); + } + + } else { + for (var j = 0; j < editors.length; j++){ + if (editors[j].type === "read") { + files[editors[j].file] = 0; + hasFiles = true; + } + } + if (hasFiles && ! fileModsCheckTimerInProgress) { + //console.log("check for FILE changes"); + fileModsCheckTimerInProgress = true; + serverAction({action: 'filemods', paths: JSON.stringify(files)}).then(function(filemods) { + fileModsCheckTimerInProgress = false; + var editorMap = {}; + for (var i = 0; i < editors.length; i++) { + if (editors[i].type === "read") { + editorMap[editors[i].file] = editors[i]; + } + } + for (var file in files) { + if (files.hasOwnProperty(file)) { + if (filemods.hasOwnProperty(file)) { + if (filemods[file] === "") { + // file was deleted + if (editorMap[file].tab.find(".ce_modified_on_disk").length === 0) { + problems.push("Deleted: " + htmlEncode(file) + ""); + editorMap[file].tab.css("color","orange").append(""); + } + } else if (! editorMap[file].hasOwnProperty("filemod")) { + // first time we have checked filemod on this file. so store the response + editorMap[file].filemod = filemods[file]; + } else if (filemods[file] > editorMap[file].filemod + 10) { // add a buffer of 10 seconds + // file has updated behind the scenes + if (editorMap[file].tab.find(".ce_modified_on_disk").length === 0) { + problems.push("Changed: " + htmlEncode(file) + ""); + editorMap[file].tab.css("color","orange").append(""); + } + } + } + } + } + if (problems.length) { + showModal({ + title: "Warning", + body: "
Warning: An open file has unexpectedly changed on disk. You should right-click in the affected editor and select either: 'Diff unsaved changes' to see what might have changed, or 'Reload from disk'.

" + problems.join("
") + "
", + size: 600 + }); + } + }).catch(function(){ + fileModsCheckTimerInProgress = false; + }); + } + } + } + + // Build the list of config files, + // This function is also called after settings are changed. + function loadPermissionsAndConfList(){ + return serverAction({action:'init'}).then(function(data) { + var rex = /^Checking: .*[\/\\]([^\/\\]+?).conf\s*$/gmi; + var res; + var stanza; + conf = data.conf.global; + if (! conf.hasOwnProperty('git_autocommit_work_tree')) { + conf.git_autocommit_work_tree = ""; + } else { + conf.git_autocommit_work_tree = $.trim(conf.git_autocommit_work_tree); + } + $dashboard_body.addClass('ce_no_write_access ce_no_run_access ce_no_settings_access ce_no_git_access '); + if (confIsTrue('write_access', false)) { + $dashboard_body.removeClass('ce_no_write_access'); + } + if (confIsTrue('run_commands', false)) { + $dashboard_body.removeClass('ce_no_run_access'); + } + if (! confIsTrue('hide_settings', false)) { + $dashboard_body.removeClass('ce_no_settings_access'); + } + if (confIsTrue('git_autocommit', false) && conf.git_autocommit_work_tree !== "") { + $dashboard_body.removeClass('ce_no_git_access'); + } + + if (conf.btool_dir_for_deployment_apps) { + conf.btool_dir_for_deployment_apps = $.trim(conf.btool_dir_for_deployment_apps).replace(/\/$/, ""); + } + if (conf.btool_dir_for_master_apps) { + conf.btool_dir_for_master_apps = $.trim(conf.btool_dir_for_master_apps).replace(/\/$/, ""); + } + if (conf.btool_dir_for_shcluster_apps) { + conf.btool_dir_for_shcluster_apps = $.trim(conf.btool_dir_for_shcluster_apps).replace(/\/$/, ""); + } + + if (conf.hasOwnProperty('conf_validate_on_save_exclusions')) { + conf.conf_validate_on_save_exclusions = $.trim(conf.conf_validate_on_save_exclusions); + if (conf.conf_validate_on_save_exclusions !== "") { + try { + conf._conf_validate_on_save_exclusions = new RegExp(conf.conf_validate_on_save_exclusions, ''); + } catch (e) { + console.error("Config file property: \"conf_validate_on_save_exclusions\" has bad regular expression and will be ignored."); + } + } + } + if (typeof conf._conf_validate_on_save_exclusions !== "object") { + conf._conf_validate_on_save_exclusions = new RegExp("savedsearches", ''); + } + + + if (conf.hasOwnProperty('master_apps_gutter_useful_props_and_transforms')) { + conf.master_apps_gutter_useful_props_and_transforms = $.trim(conf.master_apps_gutter_useful_props_and_transforms); + if (conf.master_apps_gutter_useful_props_and_transforms !== "") { + try { + conf._master_apps_gutter_useful_props_and_transforms = new RegExp(conf.master_apps_gutter_useful_props_and_transforms, ''); + } catch (e) { + console.error("Config file property: \"master_apps_gutter_useful_props_and_transforms\" has bad regular expression and will be ignored."); + } + } + } + + if (conf.hasOwnProperty('master_apps_gutter_used_sourcetypes')) { + conf.master_apps_gutter_used_sourcetypes = $.trim(conf.master_apps_gutter_used_sourcetypes); + if (conf.master_apps_gutter_used_sourcetypes !== "") { + try { + conf._master_apps_gutter_used_sourcetypes = new RegExp(conf.master_apps_gutter_used_sourcetypes, ''); + // attempt to load the date + if (! conf.hasOwnProperty('master_apps_gutter_used_sourcetypes_date')) { + conf.master_apps_gutter_used_sourcetypes_date = ""; + } + var date_set = new Date(conf.master_apps_gutter_used_sourcetypes_date).valueOf(); + if (isNaN(date_set)) { + conf._master_apps_gutter_used_sourcetypes_date = "Unknown"; + } else { + conf._master_apps_gutter_used_sourcetypes_date = Math.floor(((new Date().valueOf()) - date_set) / 86400000); + } + + } catch (e) { + console.error("Config file property: \"master_apps_gutter_used_sourcetypes\" has bad regular expression and will be ignored."); + } + } + } + + if (conf.hasOwnProperty('master_apps_gutter_unnecissary_config_files')) { + conf.master_apps_gutter_unnecissary_config_files = $.trim(conf.master_apps_gutter_unnecissary_config_files); + if (conf.master_apps_gutter_unnecissary_config_files !== "") { + try { + conf._master_apps_gutter_unnecissary_config_files = new RegExp(conf.master_apps_gutter_unnecissary_config_files, ''); + } catch (e) { + console.error("Config file property: \"master_apps_gutter_unnecissary_config_files\" has bad regular expression and will be ignored."); + } + } + } + + if (conf.hasOwnProperty('debug_refresh_endpoints')) { + conf._debug_refresh_endpoints = conf.debug_refresh_endpoints.split("|"); + } else { + conf._debug_refresh_endpoints = []; + } + + if (confIsTrue('rest_api_dashboard_list', false)) { + $(".ce_show_rest").css("display",""); + } else { + $(".ce_show_rest").css("display","none"); + } + + // Build the quick access hooksActive object + hooksActive = []; + var hookDefaults = data.conf.hook || {}; + for (stanza in data.conf) { + if (data.conf.hasOwnProperty(stanza)) { + if (stanza.substr(0,5) === "hook:") { + data.conf[stanza] = $.extend({}, hookDefaults, data.conf[stanza]); + if (! isTrueValue(data.conf[stanza].disabled)) { + var action = data.conf[stanza].action.split(":")[0]; + if (! hooksCfg.hasOwnProperty(action)) { + console.error("Stanza: [" + stanza + "] has unknown action value and will be ignored."); + continue; + } + if (action.substr(0,3) === "run") { + if (! confIsTrue('run_commands', false)) { + //console.error("Stanza: [" + stanza + "] has 'run' action but run_commands is false"); + continue; + } + if (action === "run") { + data.conf[stanza].label = "$" + data.conf[stanza].label; + } + } + try { + data.conf[stanza]._match = new RegExp(data.conf[stanza].match, 'i'); + hooksActive.push(data.conf[stanza]); + } catch (e) { + console.error("Stanza: [" + stanza + "] has bad regular expression and will be ignored."); + } + } + } + } + } + hooksActive.sort(function(a, b) { + if (a.order < b.order) + return -1; + if (a.order > b.order) + return 1; + return 0; + }); + var actions = []; + var actionDefaults = data.conf.action || {}; + var ce_custom_actions = $(".ce_custom_actions"); + // Build the actions buttons on the home tab + ce_custom_actions.css("display","block"); + for (stanza in data.conf) { + if (data.conf.hasOwnProperty(stanza)) { + if (stanza.substr(0,7) === "action:") { + var act = $.extend({}, actionDefaults, data.conf[stanza]); + if (! isTrueValue(act.disabled)) { + actions.push(act); + } + } + } + } + actions.sort(function(a, b) { + if (a.order < b.order) + return -1; + if (a.order > b.order) + return 1; + return 0; + }); + + ce_custom_actions.empty(); + for (var i = 0; i < actions.length; i++) { + if (actions[i].action === "heading") { + $("
").text(actions[i].label).appendTo(ce_custom_actions); + + } else if (actions[i].action === "text") { + $("").text(actions[i].label).appendTo(ce_custom_actions); + + } else if (actions[i].action === "br") { + $("
").appendTo(ce_custom_actions); + + } else { + // add to the home screen + (function(a, i, l){ + var button = $("").text(a.label).attr("title",a.description).on("click", function(){ + runAction(a.action, undefined, false); + }); + button.appendTo(ce_custom_actions); + })(actions[i], i, actions.length); + } + } + + + confFiles = {}; + confFilesSorted = []; + while((res = rex.exec(data.files)) !== null) { + if (! confFiles.hasOwnProperty(res[1])) { + confFiles[res[1]] = null; + confFilesSorted.push(res[1]); + } + } + confFilesSorted.sort(); + }); + } + + // First load after init has occcured, setup the page + loadPermissionsAndConfList().then(function(){ + $ce_spinner.detach(); + $dashboard_body.removeClass("ce_loading"); + + setThemeMode(localStorage.getItem('ce_theme') || "vs-dark"); + setLeftPathWidth(localStorage.getItem('ce_lwidth') || 280); + + // on page load, log that tabs that were open previously + var ce_open_tabs = (JSON.parse(localStorage.getItem('ce_open_tabs')) || []); + if (ce_open_tabs.length) { + // move any previously open tabs into the close tabs list + for (var i = 0; i < ce_open_tabs.length; i++){ + logClosedTab(ce_open_tabs[i]); + } + var $restore = $(" Restore " + (ce_open_tabs.length === 1 ? "1 tab" : ce_open_tabs.length + " tabs") + "").appendTo($ce_tabs); + $restore.on("click", function(){ + for (var j = 0; j < ce_open_tabs.length; j++) { + hooksCfg[ce_open_tabs[j].type](ce_open_tabs[j].file); + } + }); + } + + // Allow tabs to be rearranged + Sortable.create($ce_tabs[0], { + draggable: ".ce_tab", + animation: 150, + onEnd: function () { + // figure out how things moved and reorder list + openTabsListChanged(); + doPipeTabSeperators(); + } + }); + + // Add tooltips + $ce_tree_icons.find('i').tooltip({delay: 100, placement: 'bottom'}); + + $("body").css("overflow",""); + + readUrlHash(); + + // Left pane styled scrollbar + OverlayScrollbars($ce_file_list[0],{ className : "os-theme-light", overflowBehavior : { x: "hidden"} }); + + // Show a warning the first time someone opens the app + if (! localStorage.getItem('ce_seen_warning')) { + localStorage.setItem('ce_seen_warning', "1"); + showModal({ + title: "Dragons ahead!", + size: 600, + body: + "
Warning: This is designed for advanced users.

This app can allow you to change Splunk files on the "+ + "filesystem. When you change files, if you don't know what you are doing, then you may break your Splunk environment.

" + + (!(confIsTrue('write_access', false) || confIsTrue('hide_settings', false)) ? "By default, write_access=false so files cannot be saved. Open the 'Settings' screen to enable.

" : "") + + '

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.' + + "
", + onShow: function(){ + $('.ce_quicksettings').on("click",function(e){ + e.preventDefault(); + readFile(""); + $(".modal").modal('hide'); + }); + }, + actions: [{ + onClick: function(){ $(".modal").modal('hide'); }, + cssClass: 'btn-primary', + label: "OK" + }] + }); + } + // Build the left pane + showTreePaneSpinner(); + if (Number(conf.cache_file_depth) > 0) { + var fsCompleted = false; + serverAction({action:'fs'}).then(function(contents){ + filecache = contents; + readFolder(inFolder); + fsCompleted = true; + }); + setTimeout(function(){ + if (!fsCompleted) { + $("
Taking too long?
Reduce cache_file_depth in Settings
").appendTo($ce_tree_pane); + } + }, 3000); + } else { + if (Number(conf.cache_file_depth) === -1) { + filecache = null; + } + readFolder(inFolder); + } + // Keep track if the page is visible or not. This will affect how often we check for changes to open files + $(document).on('visibilitychange', function(){ + if (document.hidden) { + fileModsCheckTimerPeriod = 60000; + clearTimeout(fileModsCheckTimer); + setTimeout(function(){ checkFileMods(); }, fileModsCheckTimerPeriod); + } else { + fileModsCheckTimerPeriod = 10000; + // When the tab gains focus, immidiatly check for updated files + checkFileMods(); + } + }); + }); +}); diff --git a/apps/config_explorer/appserver/static/mirage-upgrade.png b/apps/config_explorer/appserver/static/mirage-upgrade.png new file mode 100755 index 00000000..1f8eeead Binary files /dev/null and b/apps/config_explorer/appserver/static/mirage-upgrade.png differ diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/CHANGELOG.md b/apps/config_explorer/appserver/static/node_modules/monaco-editor/CHANGELOG.md new file mode 100755 index 00000000..c03925a0 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/CHANGELOG.md @@ -0,0 +1,756 @@ +# Monaco Editor Changelog + +## [0.19.3] (14.01.2020) + +* brings back a way to get resolved editor options - [#1734](https://github.com/microsoft/monaco-editor/issues/1734) + +### Thank you + +Contributions to `monaco-editor`: +* [Brijesh Bittu (@brijeshb42)](https://github.com/brijeshb42): Playground: Add keyboard shortcut to run playground code [PR #1756](https://github.com/microsoft/monaco-editor/pull/1756) + +Contributions to `monaco-languages`: +* [Rikki Schulte (@acao)](https://github.com/acao): add tokenizer for graphql language variables [PR #78](https://github.com/microsoft/monaco-languages/pull/78) + + +## [0.19.2] (06.01.2020) + +* fixes issue with default value of `autoIndent` - [#1726](https://github.com/microsoft/monaco-editor/issues/1726) + +## [0.19.1] (06.01.2020) + +* fixes issue with .d.ts file in the ESM distribution - [#1729](https://github.com/microsoft/monaco-editor/issues/1729) +* adds types for global editor options (such as `wordBasedSuggestions`) - [#1746](https://github.com/microsoft/monaco-editor/issues/1746) +* adds support for reStructuredText. + +### Thank you + +Contributions to `monaco-editor`: +* [Lars Hvam (@larshp)](https://github.com/larshp) + * Playground: add ABAP sample [PR #1737](https://github.com/microsoft/monaco-editor/pull/1737) + * Playground: fix codelens provider example [PR #1738](https://github.com/microsoft/monaco-editor/pull/1738) + +Contributions to `monaco-languages`: +* [Changwon Choe (@qwefgh90)](https://github.com/qwefgh90): add support for reStructuredText [PR #77](https://github.com/microsoft/monaco-languages/pull/77) + + +## [0.19.0] (20.12.2019) + +### New & Noteworthy + +* It is now possible to pass in a `dimension` in the editor construction options in order to avoid a synchronous layout. +* There is new API to provide semantic tokens. +* New options: + * `multiCursorPaste`: define how to distribute paste in case of multi-cursor + * `matchBrackets`: control if enclosing brackets should be highlighted +* Fixes for tokenization in: TypeScript, JavaScript, Handlebars, Kotlin and VB. + +### Breaking changes + +* `getConfiguration()` is replaced by `getRawOptions()`, which returns the passed in editor options. + +### Thank you + +Contributions to `monaco-editor`: + +* [Lars Hvam (@larshp)](https://github.com/larshp) + * contributing: add details for running website locally [PR #1617](https://github.com/microsoft/monaco-editor/pull/1617) + * playground: update symbols-provider-example [PR #1616](https://github.com/microsoft/monaco-editor/pull/1616) +* [Remy Suen (@rcjsuen)](https://github.com/rcjsuen): Add CompletionItem with snippet support to the example [PR #1703](https://github.com/microsoft/monaco-editor/pull/1703) + +Contributions to `monaco-editor-webpack-plugin`: +* [Dominik Moritz (@domoritz)](https://github.com/domoritz): Bump to 0.16 [PR #62](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/62) +* [Mike Greiling (@mikegreiling)](https://github.com/mikegreiling): Fix __webpack_public_path__ within getWorkerUrl method [PR #63](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/63) +* [Roman Krasiuk (@rkrasiuk)](https://github.com/rkrasiuk): Bump to 0.17.0 and Add graphql support [PR #67](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/67) +* [Niklas Mollenhauer (@nikeee)](https://github.com/nikeee): Add loader-utils and make @types/webpack a dev dependency [PR #74](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/74) +* [James Diefenderfer (@jimmydief)](https://github.com/jimmydief) + * Add support for plugin-specific public path [PR #81](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/81) + * Add support for dynamic filenames [PR #83](https://github.com/microsoft/monaco-editor-webpack-plugin/pull/83) + +Contributions to `monaco-languages`: + +* [Maksym Bykovskyy (@mbykovskyy)](https://github.com/mbykovskyy): Adds cameligo language support [PR #75](https://github.com/microsoft/monaco-languages/pull/75) +* [Steven Degutis (@sdegutis)](https://github.com/sdegutis): Adds Markdown Table syntax highlighting [PR #73](https://github.com/microsoft/monaco-languages/pull/73) +* [Sergey Romanov (@Serhioromano)](https://github.com/Serhioromano): Improvements to ST language [PR #76](https://github.com/microsoft/monaco-languages/pull/76) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke): [JS/TS] Add support for the nullish-coalesce operator [PR #74](https://github.com/microsoft/monaco-languages/pull/74) + +Contributions to `monaco-typescript`: + +* [Denys Vuika (@DenysVuika)](https://github.com/DenysVuika): register multiple extra libs at once [PR #24](https://github.com/microsoft/monaco-typescript/pull/24) +* [Elizabeth Craig (@ecraig12345)](https://github.com/ecraig12345) + * Generate and publish typings for package [PR #50](https://github.com/microsoft/monaco-typescript/pull/50) + * Remove another require call [PR #49](https://github.com/microsoft/monaco-typescript/pull/49) +* [@katis](https://github.com/katis): Update TypeScript to 3.7.2 [PR #51](https://github.com/microsoft/monaco-typescript/pull/51) +* [Tamas Kiss (@kisstkondoros)](https://github.com/kisstkondoros): Add documentation to signature help [PR #52](https://github.com/microsoft/monaco-typescript/pull/52) +* [Lars Hvam (@larshp)](https://github.com/larshp): fix typo [PR #45](https://github.com/microsoft/monaco-typescript/pull/45) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke) + * Provide related information to diagnostics [PR #48](https://github.com/microsoft/monaco-typescript/pull/48) +* [Alessandro Fragnani (@alefragnani)](https://github.com/alefragnani): Add Pascal samples [PR #1358](https://github.com/microsoft/monaco-editor/pull/1358) + * Adopt monaco.MarkerTag API [PR #47](https://github.com/microsoft/monaco-typescript/pull/47) + * Add support to ignore certain diagnostics [PR #46](https://github.com/microsoft/monaco-typescript/pull/46) + +## [0.18.1] (19.09.2019) + +* fixes 2 issues with the ESM distribution - [#1572](https://github.com/microsoft/monaco-editor/issues/1572) and [#1574](https://github.com/microsoft/monaco-editor/issues/1574) +* fixes very slow scrolling in Firefox - [#1575](https://github.com/microsoft/monaco-editor/issues/1575) +* new syntax highlighting for: pascaligo, ABAP, Sophia ML, Twig and MIPS. + +### Thank you + +Contributions to `monaco-editor`: + +* [Alessandro Fragnani (@alefragnani)](https://github.com/alefragnani): Add Pascal samples [PR #1358](https://github.com/microsoft/monaco-editor/pull/1358) +* [Daniel Wang (@datou0412)](https://github.com/datou0412): Add koltin sample for website [PR #1351](https://github.com/microsoft/monaco-editor/pull/1351) +* [Ehsan (@ehsan-mohammadi)](https://github.com/ehsan-mohammadi): Updated html sample code [PR #1387](https://github.com/microsoft/monaco-editor/pull/1387) +* [Jonas Fonseca (@jonas)](https://github.com/jonas): CHANGELOG: Fix year for releases made in 2019 [PR #1388](https://github.com/microsoft/monaco-editor/pull/1388) +* [Milen Radkov (@mradkov)](https://github.com/mradkov): Add Sophia ML example [PR #1543](https://github.com/microsoft/monaco-editor/pull/1543) +* [Sergey Romanov (@Serhioromano)](https://github.com/Serhioromano): Structured text example [PR #1552](https://github.com/microsoft/monaco-editor/pull/1552) +* [zhnlviing (@zhanghongnian)](https://github.com/zhanghongnian): fix demo: completion provider example [PR #1537](https://github.com/microsoft/monaco-editor/pull/1537) + +Contributions to `monaco-json`: + +* [Dominik Moritz (@domoritz)](https://github.com/domoritz) + * Upgrade dependencies [PR #11](https://github.com/microsoft/monaco-json/pull/11) + * Add config to disable default formatter [PR #10](https://github.com/microsoft/monaco-json/pull/10) + +Contributions to `monaco-languages`: + +* [Brice Aldrich (@DefinitelyNotAGoat)](https://github.com/DefinitelyNotAGoat): pascaligo: adding pascaligo language support [PR #69](https://github.com/microsoft/monaco-languages/pull/69) +* [Salam Elbilig (@finalfantasia)](https://github.com/finalfantasia): [clojure] treat comma as whitespace [PR #63](https://github.com/microsoft/monaco-languages/pull/63) +* [Alf Eaton (@hubgit)](https://github.com/hubgit): [xml] Add OPF and XSL file extensions [PR #64](https://github.com/microsoft/monaco-languages/pull/64) +* [Lars Hvam (@larshp)](https://github.com/larshp) + * [ABAP] Add ABAP language support [PR #72](https://github.com/microsoft/monaco-languages/pull/72) + * readme: align "add new language" example [PR #70](https://github.com/microsoft/monaco-languages/pull/70) +* [Milen Radkov (@mradkov)](https://github.com/mradkov) + * Add support for Sophia ML [PR #67](https://github.com/microsoft/monaco-languages/pull/67) + * add `None` and `Some` keywords to SophiaML [PR #68](https://github.com/microsoft/monaco-languages/pull/68) +* [Marco Petersen (@ocrampete16)](https://github.com/ocrampete16): Add support for the Twig template language [PR #71](https://github.com/microsoft/monaco-languages/pull/71) +* [Progyan Bhattacharya (@Progyan1997)](https://github.com/Progyan1997): [Feat] MIPS: Support for Syntax Highlight and Basic Colorization [PR #65](https://github.com/microsoft/monaco-languages/pull/65) +* [Sergey Romanov (@Serhioromano)](https://github.com/Serhioromano): [ST] Some updated for Structured Text Language support [PR #66](https://github.com/microsoft/monaco-languages/pull/66) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke): [JS/TS] Add support for BigInt [PR #62](https://github.com/microsoft/monaco-languages/pull/62) + +Contributions to `monaco-typescript`: + +* [Andre Wachsmuth (@blutorange)](https://github.com/blutorange): Fix microsoft/monaco-editor#1576 update dependency to core [PR #41](https://github.com/microsoft/monaco-typescript/pull/41) +* [Javey (@Javey)](https://github.com/Javey): Make it can be compressed by uglify-js [PR #34](https://github.com/microsoft/monaco-typescript/pull/34) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke): Add a rename provider [PR #39](https://github.com/microsoft/monaco-typescript/pull/39) +* [@ulrichb](https://github.com/ulrichb): Expose TypeScript version via `monaco.languages.typescript.typeScriptVersion` [PR #31](https://github.com/microsoft/monaco-typescript/pull/31) + +## [0.18.0] (04.09.2019) + +### New & Noteworthy + +* Minimap enhancement + * Selections and find results are now rendered in the minimap. + * Model decorations now support `IModelDecorationOptions.minimap`, once set the decoration will be rendered in the minimap +* New editor options + * `autoClosingOvertype`: it controls whether the editor allows [typing over closing quotes or brackets](https://github.com/microsoft/vscode/issues/37315#issuecomment-515200477). + * `cursorSurroundingLines`: it controls how many visible lines to display around the cursor while moving the cursor towards beginning or end of a file. + * `renderWhitespace: "selection"`: the editor can render whitespaces only in selection. + +### API changes + +* `DeclarationProvider`: The declaration provider interface defines the contract between extensions and the go to declaration feature. +* `SelectionRangeProvider` Provide smart selection ranges for the given positions, see VS Code [issue](https://github.com/microsoft/vscode/issues/67872). +* CodeLensProvider should now return `CodeLensList` instead of `ICodeLensSymbol[]`. +* `DocumentSymbol` has a new property `tags` to support more types. +* View Zone id is now `string` instead of `number`. + +### Thank you + +Contributions to `monaco-json`: + +* [Ԝеѕ @wesinator](https://github.com/wesinator): Add .har extension [#9](https://github.com/microsoft/monaco-json/pull/9) + +## [0.17.1] (25.06.2019) +* Update monaco-typescript to TypeScript 3.5.0. + +## [0.17.0] (05.05.2019) + +### New & Noteworthy + +* Localization support is brought back for AMD bundle. We lost the localization support when VS Code moved to the localization system but now AMD bundles ships the same localized strings VS Code localization extensions ship. For more details, please read [Monaco#822](https://github.com/Microsoft/monaco-editor/issues/822) and related [VS Code upstream issue](https://github.com/Microsoft/vscode/issues/71065) +* `LinkProvider.ProvideLinks` should now return `ILinksList` instead of `ILink[]`. +* `IEditorOptions.iconsInSuggestions` and `EditorContribOptions.iconsInSuggestions` are now replaced by `EditorContribOptions.suggest.showIcons`. +* We introduced `EditorContribOptions.suggest.maxVisibleSuggestions` to control maximum suggestions to show in suggestions widget. +* `EditorContribOptions.suggest.filteredTypes` is now introduced to allow suggestions to be filtered by the user. For more details, please read [vscode#45039](https://github.com/Microsoft/vscode/issues/45039). + +### Thank You + +Contributions to `monaco-editor`: + +* [Jonas Fonseca @jonas](https://github.com/jonas): Fix year for releases made in 2019 [PR #1388](https://github.com/Microsoft/monaco-editor/pull/1388) + + +## [0.16.2] (19.03.2019) +* Fixes for HTML and JSON (https://github.com/Microsoft/monaco-editor/issues/1367, https://github.com/Microsoft/monaco-editor/issues/1254) + +## [0.16.1] (14.03.2019) +* Fixes issue with context menu (https://github.com/Microsoft/monaco-editor/issues/1357) + +## [0.16.0] (05.03.2019) + +### New & Noteworthy + +* Added built-in support for AMD cross-domain web worker loading. +* Added API to remeasure fonts (`monaco.editor.remeasureFonts`) in case custom fonts are used and the editor is painted at a time when the fonts are not finished loading. +* Various editor improvements, such as an option to `renderFinalNewline`, or to have a `cursorSmoothCaretAnimation` +* Colorization support for Tcl, Pascal, Kotlin and GraphQL. + +### Breaking changes + +* We are no longer shipping WinJS.Promise, but we are shipping with a Promise shim (for IE11). +* `CompletionItem.range` is now mandatory. Most times, you can use `model.getWordUntilPosition()` to get a good range. +* `DefinitionLink` has been renamed to `LocationLink` and a couple of its fields have also been renamed. + +### Thank you + +Contributions to `monaco-editor`: + +* [Sebastián Gurin (@cancerberoSgx)](https://github.com/cancerberoSgx): fix worker paths in parcel [PR #1339](https://github.com/Microsoft/monaco-editor/pull/1339) +* [@datou0412](https://github.com/datou0412): Fix lineDecoration example css error [PR #1337](https://github.com/Microsoft/monaco-editor/pull/1337) +* [Joshua Sullivan (@jbsulli)](https://github.com/jbsulli): Fix JavaScript RegExp range closing bracket [PR #1329](https://github.com/Microsoft/monaco-editor/pull/1329) +* [Krish De Souza (@Kedstar99)](https://github.com/Kedstar99): Fixed various HTML errors with the various webpages [PR #1309](https://github.com/Microsoft/monaco-editor/pull/1309) +* [Swarnava Sengupta (@swarnava)](https://github.com/swarnava): Make copyright year dynamic [PR #1303](https://github.com/Microsoft/monaco-editor/pull/1303) + +Contributions to `monaco-languages`: + +* [alan.invents (@ALANVF)](https://github.com/ALANVF): Add Tcl support [PR #59](https://github.com/Microsoft/monaco-languages/pull/59) +* [Alessandro Fragnani (@alefragnani)](https://github.com/alefragnani): Pascal language support [PR #60](https://github.com/Microsoft/monaco-languages/pull/60) +* [Brijesh Bittu (@brijeshb42)](https://github.com/brijeshb42): Update ruby auto indentation rules [PR #58](https://github.com/Microsoft/monaco-languages/pull/58) +* [Andrew (@creativedrewy)](https://github.com/creativedrewy): Add Kotlin Language Support [PR #57](https://github.com/Microsoft/monaco-languages/pull/57) +* [Salam Elbilig (@finalfantasia)](https://github.com/finalfantasia): [clojure] Improve the regular expressions for various symbols [PR #56](https://github.com/Microsoft/monaco-languages/pull/56) +* [Neil Jones (@futurejones)](https://github.com/futurejones): Solidity - add "constructor" to main keywords [PR #55](https://github.com/Microsoft/monaco-languages/pull/55) +* [Pavel Lang (@langpavel)](https://github.com/langpavel): GraphQL language support [PR #54](https://github.com/Microsoft/monaco-languages/pull/54) +* [Samuel Helms (@samghelms)](https://github.com/samghelms): allows annotation in markdown language block headers [PR #61](https://github.com/Microsoft/monaco-languages/pull/61) + +Contributions to `monaco-typescript`: + +* [Olga Lesnikova (@Geloosa)](https://github.com/Geloosa): more safe extra lib filePath generation [PR #29](https://github.com/Microsoft/monaco-typescript/pull/29) +* [Stefan Lacatus (@stefan-lacatus)](https://github.com/stefan-lacatus): Optimize how external libs are handled and allow for custom languages [PR #30](https://github.com/Microsoft/monaco-typescript/pull/30) + +## [0.15.6] (23.11.2018) +* Fixes issue with context menu (https://github.com/Microsoft/monaco-editor/issues/1199) + +## [0.15.5] (16.11.2018) +* Re-remove cast to any from our code base to allow for tree shaking to not shake useful code (https://github.com/Microsoft/monaco-editor/issues/1013) + +## [0.15.4] (15.11.2018) +* Fixes context menu in IE11 - https://github.com/Microsoft/monaco-editor/issues/1191 +* Fixes suggest widget - https://github.com/Microsoft/monaco-editor/issues/1185 and https://github.com/Microsoft/monaco-editor/issues/1186 + +## [0.15.3] (15.11.2018) +* Remove cast to any from our code base to allow for tree shaking to not shake useful code (https://github.com/Microsoft/monaco-editor/issues/1013) + +## [0.15.2] (14.11.2018) +* Fixes usage of `marked` to allow for packaging with rollup (https://github.com/Microsoft/monaco-editor/issues/1183) + +## [0.15.1] (13.11.2018) +* Fixes the `/esm/` distribution (https://github.com/Microsoft/monaco-editor/issues/1178) + +## [0.15.0] (12.11.2018) + +### New & Noteworthy + +* Improved typings in `monaco.d.ts` to better reflect null types. + +### Breaking changes + +* We are slowly migrating our code-base away from WinJS promises, so the exposed `monaco.Promise` API has been reduced to indicate that. We are setting up a Promise polyfill to cover browsers which do not have a native Promise implementation yet (i.e. IE11). +* `CompletionItemProvider.provideCompletionItems` and `CompletionItemProvider.resolveCompletionItem` have been modified to better reflect the API of VS Code. Both arguments and return type have changed. +* `SignatureHelpProvider.provideSignatureHelp` now receives an extra argument for the context. +* Various new editor options or tweaks to existing ones: `parameterHints`, `autoClosingBrackets`, `autoClosingQuotes`, `autoSurround`, `copyWithSyntaxHighlighting`, `tabCompletion`. + +### Thank you + +Contributions to `monaco-editor`: + +* [Arvind S (@arvind0598)](https://github.com/arvind0598): Updated C# sample code for a simpler game. [PR #1160](https://github.com/Microsoft/monaco-editor/pull/1160) +* [Brooks Becton (@brooksbecton)](https://github.com/brooksbecton): Removing obsolete Note in Monarch Docs [PR #1089](https://github.com/Microsoft/monaco-editor/pull/1089) +* [James Orr (@buzzcola)](https://github.com/buzzcola): Correct comma splice in README.md [PR #1111](https://github.com/Microsoft/monaco-editor/pull/1111) +* [Chintogtokh Batbold (@chintogtokh)](https://github.com/chintogtokh): Clarify that repo doesn't contain source code [PR #1119](https://github.com/Microsoft/monaco-editor/pull/1119) +* [Chris Helgert (@chrishelgert)](https://github.com/chrishelgert): Move issue template to '.github' folder and add some styling for better readability [PR #1121](https://github.com/Microsoft/monaco-editor/pull/1121) +* [Steven Bock (@dabockster)](https://github.com/dabockster): Added better Java sample (FizzBuzz instead of JUnit) [PR #1161](https://github.com/Microsoft/monaco-editor/pull/1161) +* [Michele Gobbi (@dynamick)](https://github.com/dynamick): Added Ruby [PR #1102](https://github.com/Microsoft/monaco-editor/pull/1102) +* [Edilson Ngulele (@EdNgulele)](https://github.com/EdNgulele): style: Updated CONTRIBUTING.md [PR #1088](https://github.com/Microsoft/monaco-editor/pull/1088) +* [Evan Walters (@evanwaltersdev)](https://github.com/evanwaltersdev): issue guidelines [PR #1096](https://github.com/Microsoft/monaco-editor/pull/1096) +* [Abdussalam Abdurrahman (@finalfantasia)](https://github.com/finalfantasia): [clojure] Update Clojure example with one that's more representative. [PR #1059](https://github.com/Microsoft/monaco-editor/pull/1059) +* [@flash76](https://github.com/flash76): Update README.md [PR #1141](https://github.com/Microsoft/monaco-editor/pull/1141) +* [Daniel Pasch (@gempir)](https://github.com/gempir): fix 2 of 7 npm package vurnerabilities [PR #1087](https://github.com/Microsoft/monaco-editor/pull/1087) +* [@Hotlar](https://github.com/Hotlar): lingual fixes to readme [PR #1086](https://github.com/Microsoft/monaco-editor/pull/1086) +* [Jeremy Meiss (@jerdog)](https://github.com/jerdog): correct README grammar [PR #1114](https://github.com/Microsoft/monaco-editor/pull/1114) +* [Joaquim Honório (@JoaquimCMH)](https://github.com/JoaquimCMH): Update CHANGELOG [PR #1152](https://github.com/Microsoft/monaco-editor/pull/1152) +* [Ricardo Ambrogi (@KadoBOT)](https://github.com/KadoBOT): Remove commented code [PR #1113](https://github.com/Microsoft/monaco-editor/pull/1113) +* [Abhinav Srivastava (@krototype)](https://github.com/krototype): changed the license block of readme [PR #1133](https://github.com/Microsoft/monaco-editor/pull/1133) +* [Mera Gangapersaud (@Mera-Gangapersaud)](https://github.com/Mera-Gangapersaud): Fixed prerequisites link in Contributing.md [PR #1155](https://github.com/Microsoft/monaco-editor/pull/1155) +* [Michael (@michael-k)](https://github.com/michael-k): Use python examples that work [PR #1053](https://github.com/Microsoft/monaco-editor/pull/1053) +* [Remy Suen (@rcjsuen)](https://github.com/rcjsuen): Add missing links in CHANGELOG.md [PR #1029](https://github.com/Microsoft/monaco-editor/pull/1029) +* [Shivansh Saini (@shivanshs9)](https://github.com/shivanshs9): Fixed typos in website page and CHANGELOG [PR #1153](https://github.com/Microsoft/monaco-editor/pull/1153) +* [Sachin Saini (@thetinygoat)](https://github.com/thetinygoat): hacktoberfest fix [PR #1131](https://github.com/Microsoft/monaco-editor/pull/1131) + +Contributions to `monaco-languages`: + +* [Aastha (@AasthaGupta)](https://github.com/AasthaGupta): Fix markdown bug #1107 [PR #52](https://github.com/Microsoft/monaco-languages/pull/52) +* [Abdussalam Abdurrahman (@finalfantasia)](https://github.com/finalfantasia): [clojure] Improve Clojure syntax highlighting. [PR #45](https://github.com/Microsoft/monaco-languages/pull/45) +* [Abhishek (@GeekAb)](https://github.com/GeekAb): Markdown bug fix for #1107 [PR #51](https://github.com/Microsoft/monaco-languages/pull/51) +* [Matthew D. Miller (@goober99)](https://github.com/goober99): Added support for Perl quote-like operators to fix #1101 [PR #50](https://github.com/Microsoft/monaco-languages/pull/50) +* [Grzegorz Wcisło (@grzegorz-wcislo)](https://github.com/grzegorz-wcislo): Fix yaml string tokenization [PR #47](https://github.com/Microsoft/monaco-languages/pull/47) +* [Pascal Berger (@pascalberger)](https://github.com/pascalberger): Use C# highlighting for Cake scripts [PR #53](https://github.com/Microsoft/monaco-languages/pull/53) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke) + * [JS/TS] Add support for alternative octal integer literal syntax [PR #49](https://github.com/Microsoft/monaco-languages/pull/49) + * Improve tokenization of regular expressions [PR #46](https://github.com/Microsoft/monaco-languages/pull/46) +* [Tiago Danin (@TiagoDanin)](https://github.com/TiagoDanin): New rule for non-teminated string in yaml [PR #48](https://github.com/Microsoft/monaco-languages/pull/48) + +Contributions to `monaco-typescript`: + +* [Parikshit Hooda (@Parikshit-Hooda)](https://github.com/Parikshit-Hooda): fixed typo in line 11 [PR #23](https://github.com/Microsoft/monaco-typescript/pull/23) +* [Sebastian Pahnke (@spahnke)](https://github.com/spahnke): Render documentation in suggestion widget as Markdown [PR #22](https://github.com/Microsoft/monaco-typescript/pull/22) + +Contributions to `monaco-json`: + +* [Igor Nesterenko (@nesterone)](https://github.com/nesterone): Provide diagnostic option to enable on-demand schema loading [PR #7](https://github.com/Microsoft/monaco-json/pull/7) + +Contributions to `monaco-css`: + +* [Richard Samuelson (@ricsam)](https://github.com/ricsam): Fix indentation on the CSS test page [PR #7](https://github.com/Microsoft/monaco-css/pull/7) + + + +## [0.14.3] (17.08.2018) +* Fixes TypeScript/JavaScript coloring of regular expressions https://github.com/Microsoft/monaco-editor/issues/1009 + +## [0.14.2] (10.08.2018) +* Reverts https://github.com/Microsoft/monaco-editor/pull/981 + +## [0.14.1] (10.08.2018) +* Fixes Find All References (https://github.com/Microsoft/vscode/issues/56160) + +## [0.14.0] (10.08.2018) +### New & Noteworthy +* Using tree-shaking to reduce the amount of shipped code. +* TypeScript and JavaScript coloring is now done with Monarch. +* `typescriptServices` is no longer loaded on the UI thread, this helps with webpack's bundle output size. +* Added coloring for: apex, azcli, clojure, powerquery, rust, scheme and shell. +* Added sub-word navigation commands. +* Added font zoom commands. +* Syntax highlighting for deleted lines in inline diff editor. +* Highlighted indent guide. +* Column selection using middle mouse button. +* Added editor options: `scrollBeyondLastColumn`, `hover`, `suggest`, `highlightActiveIndentGuide`, `showUnused`. +* Added `setTokensProvider` with `EncodedTokensProvider`. +* Added `monaco.languages.getEncodedLanguageId` to get the numeric language id. +* `DefinitionProvider.provideDefinition`, `ImplementationProvider.provideImplementation`, `TypeDefinitionProvider.provideTypeDefinition` can now return a `DefinitionLink`. + +### Breaking Changes +* Removed no longer used `Severity`. +* Renamed `IEditor.isFocused` to `IEditor.hasTextFocus`. +* Renamed `ICodeEditor.onDidFocusEditor` to `ICodeEditor.onDidFocusEditorWidget`. +* Renamed `ICodeEditor.onDidBlurEditor` to `ICodeEditor.onDidBlurEditorWidget`. +* `DocumentSymbolProvider.provideDocumentSymbols` must now return `DocumentSymbol[]`. + +### Thank you + +Contributions to `monaco-editor`: + +* [Ali Mirlou (@AliMirlou)](https://github.com/AliMirlou): Fix typo [PR #952](https://github.com/Microsoft/monaco-editor/pull/952) +* [Avelino (@avelino)](https://github.com/avelino): added clojure exampple [PR #904](https://github.com/Microsoft/monaco-editor/pull/904) +* [Sebastián Gurin (@cancerberoSgx)](https://github.com/cancerberoSgx): fix small error in integration docs [PR #957](https://github.com/Microsoft/monaco-editor/pull/957) +* [Haegyun Jung (@haeguri)](https://github.com/haeguri): Fix playground sample option [PR #962](https://github.com/Microsoft/monaco-editor/pull/962) +(https://github.com/Microsoft/monaco-editor/pull/914) +* [Myles Scolnick (@mscolnick)](https://github.com/mscolnick): add sideEffects false for tree-shaking in webpack [PR #981](https://github.com/Microsoft/monaco-editor/pull/981) +* [Niklas Mollenhauer (@nikeee)](https://github.com/nikeee): Fix hash comment in xdot sample [PR #916](https://github.com/Microsoft/monaco-editor/pull/916) +* [Remy Suen (@rcjsuen)](https://github.com/rcjsuen): Add folding provider sample to the playground [PR #878](https://github.com/Microsoft/monaco- + +Contributions to `monaco-typescript`: + +* [Fathy Boundjadj (@fathyb)](https://github.com/fathyb): Use Markdown code block for hover tooltip [PR #20](https://github.com/Microsoft/monaco-typescript/pull/20) +* [Matt McCutchen (@mattmccutchen)](https://github.com/mattmccutchen): Clear the `file` fields of `relatedInformation` too. (WIP) [PR #21](https://github.com/Microsoft/monaco-typescript/pull/21) + +Contributions to `monaco-languages`: + +* [Avelino (@avelino)](https://github.com/avelino) + * upgrade all language support (today) [PR #35](https://github.com/Microsoft/monaco-languages/pull/35) + * Clojure support [PR #36](https://github.com/Microsoft/monaco-languages/pull/36) + * Clojure: added more keywords [PR #37](https://github.com/Microsoft/monaco-languages/pull/37) +* [Faris Masad (@masad-frost)](https://github.com/masad-frost) + * Fix Clojure syntax highlighting [PR #38](https://github.com/Microsoft/monaco-languages/pull/38) + * Add Scheme language [PR #34](https://github.com/Microsoft/monaco-languages/pull/34) + * Add auto-indentation for python [PR #33](https://github.com/Microsoft/monaco-languages/pull/33) +* [Matt Masson (@mattmasson)](https://github.com/mattmasson): Add support for Power Query (M) language [PR #42](https://github.com/Microsoft/monaco-languages/pull/42) +* [Oli Lane (@olane)](https://github.com/olane): Add Apex language [PR #44](https://github.com/Microsoft/monaco-languages/pull/44) +* [Viktar Pakanechny (@Vityanchys)](https://github.com/Vityanchys): Added azcli [PR #43](https://github.com/Microsoft/monaco-languages/pull/43) +* [zqlu (@zqlu)](https://github.com/zqlu) + * Add Shell language [PR #39](https://github.com/Microsoft/monaco-languages/pull/39) + * Add Perl language [PR #40](https://github.com/Microsoft/monaco-languages/pull/40) + * add perl to bundle.js [PR #41](https://github.com/Microsoft/monaco-languages/pull/41) + +## [0.13.1] (15.05.2018) + - Fixes [issue #871](https://github.com/Microsoft/monaco-editor/issues/871): TypeScript import error after mocaco-editor upgraded from 0.12 to 0.13 + +## [0.13.0] (11.05.2018) +### New & Noteworthy +* New folding provider `registerFoldingRangeProvider`. +* You can now specifies the stack order of a decoration by setting `IModelDecorationOptions.zIndex`. A decoration with greater stack order is always in front of a decoration with a lower stack order. +* You can now tell Monaco if there is an `inlineClassName` which affects letter spacing. the stack order of a decoration by setting `IModelDecorationOptions.inlineClassNameAffectsLetterSpacing`. +* Get the text length for a certain line on text model (`ITextModel.getLineLength(lineNumber: number)`) +* New option `codeActionsOnSave`, controls whether code action kinds will be run on save. +* New option `codeActionsOnSaveTimeout`, controls timeout for running code actions on save. +* New option `multiCursorMergeOverlapping`, controls if overlapping selections should be merged. Default to `true`. + +### Breaking Change +* Removed `ICodeEditor.getCenteredRangeInViewport`. +* `RenameProvider.resolveRenameLocation` now returns `RenameLocation` instead of `IRange`. + +### Thank you +* [Sergey Romanov @Serhioromano](https://github.com/Serhioromano): Add new language Structured Text support [PR monaco-languages#32](https://github.com/Microsoft/monaco-languages/pull/32) +* [Yukai Huang @Yukaii](https://github.com/Yukaii): Fix backspace in IME composition on iOS Safari [PR vscode#40546](https://github.com/Microsoft/vscode/pull/40546) + +## [0.12.0] (11.04.2018) +* Special thanks to [Tim Kendrick](https://github.com/timkendrick) for contributing a webpack plugin - `monaco-editor-webpack-plugin` - now available on [npm](https://www.npmjs.com/package/monaco-editor-webpack-plugin). + +### Breaking changes +* Introduced `MarkerSeverity` instead of `Severity` for markers serverity. +* Replaced `RenameProvider.resolveInitialRenameValue` with `RenameProvider.resolveRenameLocation`. +* Fixed typo in `monaco-typescript`, renamed `setMaximunWorkerIdleTime` to `setMaximumWorkerIdleTime`. + +### Thank you +* [Remy Suen @rcjsuen](https://github.com/rcjsuen): Fix conversion code from MarkedString to IMarkdownString in hovers [PR monaco-css#5](https://github.com/Microsoft/monaco-css/pull/5) +* [Peng Xiao @pengx17](https://github.com/pengx17): fix an issue of `fromMarkdownString` [PR monaco-json#4](https://github.com/Microsoft/monaco-json/pull/4) +* [TJ Kells @systemsoverload](https://github.com/systemsoverload): Add rust colorization support [PR monaco-languages#31](https://github.com/Microsoft/monaco-languages/pull/31) + +## [0.11.1] (15.03.2018) + - Fixes [issue #756](https://github.com/Microsoft/monaco-editor/issues/756): Can't use "Enter" key to accept an IntelliSense item + - Fixes [issue #757](https://github.com/Microsoft/monaco-editor/issues/757): TypeScript errors in `editor.api.d.ts` typings + +## [0.11.0] (14.03.2018) + +### New & Noteworthy +* **ESM distribution** (compatible with e.g. webpack). +* New interval tree decorations implementation. +* New piece tree text buffer implementation. +* The minimap can be placed to the left. +* Line numbers can be displayed in an interval. +* The cursor width can be customized. +* Smooth scrolling can be turned on. +* Color decorators and color picker via `DocumentColorProvider`. + +### Breaking changes +* Replaced `MarkedString` with `IMarkdownString`. Source code snippets can be expressed using the GH markdown syntax. +* Renamed `IResourceEdit` to `ResourceTextEdit`. + +### API changes +* Merged `IModel`, `IReadOnlyModel`, `IEditableTextModel`, `ITextModelWithMarkers`, `ITokenizedModel`, `ITextModelWithDecorations` to `ITextModel`. A type alias for `IModel` is defined for compatibility. +* Merged `ICommonCodeEditor` and `ICodeEditor` to `ICodeEditor`. +* Merged `ICommonDiffEditor` and `IDiffEditor` to `IDiffEditor`. +* `CompletionItem.documentation`, `ParameterInformation.documentation` and `SignatureInformation.documentation` can now be an `IMarkdownString`. +* Added `CompetionItem.command`, `CompletionItem.commitCharacters` and `CompletionItem.additionalTextEdits`. +* Added language configuration `folding` which can define markers for code patterns where a folding regions should be created. See for example the [Python configuration](https://github.com/Microsoft/monaco-languages/blob/d2db3faa76b741bf4ee822c403fc355c913bc46d/src/python/python.ts#L35-L41). +* Added by accident `ResourceFileEdit` (due to how `monaco.d.ts` is generated from vscode). That is not honoured by the editor, and should not be used. + +### Thank you +* [Remy Suen @rcjsuen](https://github.com/rcjsuen): + * Fix a small typo in README.md [PR monaco-typescript#18](https://github.com/Microsoft/monaco-typescript/pull/18) + * Remove unused IDisposable array [PR monaco-typescript#19](https://github.com/Microsoft/monaco-typescript/pull/19) + * Add HEALTHCHECK as a Dockerfile keyword [PR monaco-languages#29](https://github.com/Microsoft/monaco-languages/pull/29) + * Add ARG as a Dockerfile keyword [PR monaco-languages#30](https://github.com/Microsoft/monaco-languages/pull/30) +* [Can Abacigil @abacigil](https://github.com/abacigil): MySQL, Postgres, Redshift and Redis Language Support [PR monaco-languages#26](https://github.com/Microsoft/monaco-languages/pull/26) +* [Matthias Kadenbach @mattes](https://github.com/mattes): Support Content-Security-Policy syntax highlighting [PR monaco-languages#27](https://github.com/Microsoft/monaco-languages/pull/27) +* [e.vakili @evakili](https://github.com/evakili): Whitespaces after # are allowed in C++ preprocessor statements [PR monaco-languages#28](https://github.com/Microsoft/monaco-languages/pull/28) +* [Pankaj Kumar Gautam @PAPERPANKS](https://github.com/PAPERPANKS): adding microsoft logo to footer [PR monaco-editor#577](https://github.com/Microsoft/monaco-editor/pull/577) +* [Dominik Moritz @domoritz](https://github.com/domoritz): Fix code in changelog [PR monaco-editor#582](https://github.com/Microsoft/monaco-editor/pull/582) +* [ItsPugle @ItsPugle](https://github.com/ItsPugle): Updating the footer to reflect change of year [PR monaco-editor#707](https://github.com/Microsoft/monaco-editor/pull/707) +* [Michael Seifert @MSeifert04](https://github.com/MSeifert04): Add linebreak for if [PR monaco-editor#726](https://github.com/Microsoft/monaco-editor/pull/726) +* [Andrew Palm @apalm](https://github.com/apalm): Fix 'Configure JSON defaults' sample [PR monaco-editor#731](https://github.com/Microsoft/monaco-editor/pull/731) +* [Niklas Mollenhauer @nikeee](https://github.com/nikeee): Fix line number API usage [PR monaco-editor#740](https://github.com/Microsoft/monaco-editor/pull/740) +* [Andre @anc](https://github.com/anc): More realistic terminal shell [PR monaco-editor#742](https://github.com/Microsoft/monaco-editor/pull/742) +* to the many others that have contributed PRs to [vscode](https://github.com/Microsoft/vscode) which have also made their way into the monaco-editor. + + +## [0.10.1] (16.10.2017) + - Fixes [issue #601](https://github.com/Microsoft/monaco-editor/issues/601): window.opener should be set to null to protect against malicious code + +## [0.10.0] (17.08.2017) + +### Breaking changes +* Removed `CodeAction`. +* Method `provideCodeActions` in `CodeActionProvider` now returns `Command[] | Thenable` instead of `CodeAction[] | Thenable`, which is already removed. + +### API changes +* added `monaco.editor.getModelMarkers`. Get markers for owner and/or resource. + +### Notable Fixes +* No longer use CSS class `.row` for command palette to avoid CSS conflicts with Bootstrap. +* Fix Accessibility Help Dialog accessible issue on IE/Edge. +* Fix Find Widget CSS compatibility issues with IE11. +* Toggle Block Comment can remove extra whitespaces. + +### Thank you +* [Kitson Kelly @kitsonk](https://github.com/kitsonk): Update monaco-typescript to TypeScript 2.4.1 [PR monaco-typescript#15](https://github.com/Microsoft/monaco-typescript/pull/15) +* [@duncanwerner](https://github.com/duncanwerner): Add hex number tokenization to R language [PR monaco-languages#21](https://github.com/Microsoft/monaco-languages/pull/21) +* [Remy Suen @rcjsuen](https://github.com/rcjsuen): Update Dockerfile grammar with STOPSIGNAL and SHELL instructions [PR monaco-languages#22](https://github.com/Microsoft/monaco-languages/pull/22) +* [Marlene Cota @marlenecota](https://github.com/marlenecota): Add Small Basic support [PR monaco-languages#23](https://github.com/Microsoft/monaco-languages/pull/23) +* [Ben Jacobson @bjacobso](https://github.com/bjacobso): Add LIMIT to sql keywords [PR monaco-languages#24](https://github.com/Microsoft/monaco-languages/pull/24) +* to the many others that have contributed PRs to [vscode](https://github.com/Microsoft/vscode) which have also made their way into the monaco-editor. + +## [0.9.0] (03.07.2017) + +### New & Noteworthy + * Minimap (on by default, use `editor.minimap` to disable it). + * Drag and Drop (on by default, use `editor.dragAndDrop` to disable it). + * Copy text with formatting. + +### Accessibility + * There is a new [guide for making the editor accessible to all](https://github.com/Microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators). + * There is a new Alt+F1 (Ctrl+F1 in IE) accessibility help panel. + * There is a new F8/Shift+F8 diff review panel in the diff editor. + * Many bugfixes, including now respecting the Windows High Contrast Theme on Edge. + +### Breaking changes + +* A lot has changed w.r.t. how themes work in the editor, mostly driven by the work to support theming in VS Code. `editor.updateOptions()` **no longer accepts `theme`**; the theme can be changed via the newly introduced `monaco.editor.setTheme()`. Additionally, we recommend editor colors be customized via `monaco.editor.defineTheme()` instead of via CSS -- see [sample](https://microsoft.github.io/monaco-editor/playground.html#customizing-the-appearence-exposed-colors). The color names will be stable, while the CSS class names might break at any time. +* Support for the internal snippet syntax **has been discontinued** and snippet must now use the official, TextMate-like syntax. Find its grammar and samples [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax). +* Changed `IModel.findMatches` to accept a list of word separators. +* Changed the shape of the `IModelContentChangedEvent` emitted via `IModel.onDidChangeContent` to **now contain a batch** of all the changes that the model had. +* No longer using `transform: translate3d`, now using `will-change: transform` for browser layer hinting. Use the `disableLayerHinting` option if you have any trouble with browser layers (blurriness or high GPU memory usage). +* Simplified wrapping settings: `wordWrap`, `wordWrapColumn` and `wordWrapMinified`. + +### API changes + +* added `monaco.languages.registerTypeDefinitionProvider`. +* new editor options: + * `accessibilityHelpUrl` - the url of a page to open for documentation about how to operate the editor when using a Screen Reader. + * `find.seedSearchStringFromSelection` - Ctrl+F/Cmd+F seeds search string from the editor selection. + * `find.autoFindInSelection` - Ctrl+F/Cmd+F turns on the find in selection toggle if the editor selection is multiline. + * `minimap.enabled` - enable minimap. + * `minimap.showSlider` - control when to render the minimap slider. + * `minimap.renderCharacters` - render characters or blocks in the minimap. + * `minimap.maxColumn` - maximum number of columns the minimap shows. + * `overviewRulerBorder` - toggle that the overview ruler renders a border. + * `links` - enable link detection. + * `multiCursorModifier` - change the multi cursor modifier key. + * `accessibilitySupport` - optimize the editor for use with a Screen Reader. + * `autoIndent` - automatically fix indentation when moving lines, pasting or typing. + * `dragAndDrop` - dragging and dropping editor selection within the editor. + * `occurrencesHighlight` - enable highlighting of occurences. + * `showFoldingControls` - fine-tune when the folding icons should show + * `matchBrackets` - enable bracket matching + * `letterSpacing` - configure font's letter-spacing. + +### Thank you + * [Joey Marianer (@jmarianer)](https://github.com/jmarianer): Support literal interpolated strings ($@"") [PR monaco-languages#13](https://github.com/Microsoft/monaco-languages/pull/13) + * [@AndersMad](https://github.com/AndersMad): HTML Tags: Add support for dash and fix colon in end tag [PR monaco-languages#14](https://github.com/Microsoft/monaco-languages/pull/14) + * [Sandy Armstrong (@sandyarmstrong)](https://github.com/sandyarmstrong): csharp: add support for binary literals and _ as separator [PR monaco-languages#16](https://github.com/Microsoft/monaco-languages/pull/16) + * [Anton Kosyakov (@akosyakov)](https://github.com/akosyakov): Include src as a part of npm package [PR monaco-languages#17](https://github.com/Microsoft/monaco-languages/pull/17) + * [Andrew Bonventre (@andybons)](https://github.com/andybons): Fix typo: concering → concerning [PR monaco-languages#18](https://github.com/Microsoft/monaco-languages/pull/18) + * [Scott McMaster (@scottmcmaster)](https://github.com/scottmcmaster): MSDAX support [PR monaco-languages#19](https://github.com/Microsoft/monaco-languages/pull/19) + * [Luzian Serafin (@lserafin)](https://github.com/lserafin): Add Solidity [PR monaco-languages#20](https://github.com/Microsoft/monaco-languages/pull/20) + * [Kitson Kelly (@kitsonk)](https://github.com/kitsonk): Update to TypeScript 2.3.4 [PR monaco-typescript#13](https://github.com/Microsoft/monaco-typescript/pull/13) + * [Kitson Kelly (@kitsonk)](https://github.com/kitsonk): Add documentation support on hover [PR monaco-typescript#14](https://github.com/Microsoft/monaco-typescript/pull/14) + * [@replacepreg](https://github.com/replacepreg): Updating date at footer [PR monaco-editor#409](https://github.com/Microsoft/monaco-editor/pull/409) + * [Aarin Smith (@aarinsmith)](https://github.com/aarinsmith): Fixed spelling error in README.md:85 'instantion' -> 'instantiation' [PR monaco-editor#440](https://github.com/Microsoft/monaco-editor/pull/440) + * to the many others that have contributed PRs to [`vscode`](https://github.com/Microsoft/vscode) which have also made their way into the `monaco-editor`. + +--- + +## [0.8.3] (03.03.2017) + - Fixes an issue in monaco-typescript where it would attempt to validate a disposed model. + +--- + +## [0.8.2] (01.03.2017) + - Fixes the following regressions: + - [issue #385](https://github.com/Microsoft/monaco-editor/issues/385): Cannot add action to the left-hand-side of the diff editor + - [issue #386](https://github.com/Microsoft/monaco-editor/issues/386): Shortcuts for actions added via editor.addAction don't show up in the Command Palette + - [issue #387](https://github.com/Microsoft/monaco-editor/issues/387): Cannot change diff editor to a custom theme based on high contrast + +--- + +## [0.8.1] (27.01.2017) + - CSS/JSON/HTML language supports updated: + - CSS: Support for @apply + - SCSS: Map support + - New HTML formatter options: unformatedContent, wrapAttributes + - Fixed issue where the editor was throwing in Safari due to `Intl` missing. + - Fixed multiple issues where the editor would not position the cursor correctly when using browser zooming. + +### API + - Added `disableMonospaceOptimizations` editor option that can be used in case browser zooming exposes additional issues. + - Added `formatOnPaste` editor option. + - Added `IActionDescriptor.precondition`. + - **Breaking change**: renamed `registerTypeDefinitionProvider` to `registerImplementationProvider` and associated types. + +--- + +## [0.8.0] (18.01.2017) + - This release has been brewing for a while and comes with quite a number of important changes. + - There are many bugfixes and speed/memory usage improvements. + - Now shipping TypeScript v2.1.5 in `monaco-typescript` (JS and TS language support). + +### No longer supporting IE9 and IE10 + - we have not made the editor fail on purpose in these browsers, but we have removed IE9/IE10 targeted workarounds from our codebase; + - now using **Typed Arrays** in a number of key places resulting in considerable speed boosts and lower memory consumption. + +### Monarch Tokenizer + - Monarch states are now memoized up to a depth of 5. This results in considerable memory improvements for files with many lines. + - Speed improvements to Monarch tokenizer that resulted in one **breaking change**: + - when entering an embedded mode (i.e. `nextEmbedded`), the state ending up in must immediately contain a `nextEmbedded: "@pop"` rule. This helps in quickly figuring out where the embedded mode should be left. The editor will throw an error if the Monarch grammar does not respect this condition. + +### Tokens are styled in JS (not in CSS anymore) + - This is a **breaking change** + - Before, token types would be rendered on the `span` node of text, and CSS rules would match token types and assign styling to them (i.e. color, boldness, etc.to style tokens) + - To enable us to build something like a minimap, we need to know the text color in JavaScript, and we have therefore moved the token style matching all to JavaScript. In the future, we foresee that even decorations will have to define their color in JavaScript. + - It is possible to create a custom theme via a new API method `monaco.editor.defineTheme()` and the playground contains a sample showing how that works. + - Token types can be inspected via `F1` > `Developer: Inspect tokens`. This will bring up a widget showing the token type and the applied styles. + +### API changes: + +#### Namespaces + - added `monaco.editor.onDidCreateEditor` that will be fired whenever an editor is created (will fire even for a diff editor, with the two editors that a diff editor consists of). + - added `monaco.editor.tokenize` that returns logical tokens (before theme matching, as opposed to `monaco.editor.colorize`). + - added `monaco.languages.registerTypeDefinitionProvider` + +#### Models + - removed `IModel.getMode()`. + - structural changes in the events `IModelLanguageChangedEvent`, `IModelDecorationsChangedEvent` and `IModelTokensChangedEvent`; + - changed `IModel.findMatches`, `IModel.findNextMatch` and `IModel.findPreviousMatch` to be able to capture matches while searching. + +#### Editors + - `ICodeEditor.addAction` and `IDiffEditor.addAction` now return an `IDisposable` to be able to remove a previously added action. + - renamed `ICodeEditor.onDidChangeModelMode ` to `ICodeEditor.onDidChangeModelLanguage`; + - `ICodeEditor.executeEdits` can now take resulting selection for better undo/redo stack management; + - added `ICodeEditor.getTargetAtClientPoint(clientX, clientY)` to be able to do hit testing. + - added `IViewZone.marginDomNode` to be able to insert a dom node in the margin side of a view zone. + - settings: + - `lineDecorationsWidth` can now take a value in the form of `"1.2ch"` besides the previous accepted number (in px) + - `renderLineHighlight` can now take a value in the set `'none' | 'gutter' | 'line' | 'all'`. + - added `fixedOverflowWidgets` to render overflowing content widgets as `'fixed'` (defaults to false) + - added `acceptSuggestionOnCommitCharacter` to accept suggestions on provider defined characters (defaults to true) + - added `emptySelectionClipboard` - copying without a selection copies the current line (defaults to true) + - added `suggestFontSize` - the font size for the suggest widget + - added `suggestLineHeight` - the line height for the suggest widget + - diff editor settings: + - added `renderIndicators` - Render +/- indicators for added/deleted changes. (defaults to true) + +### Thank you + * [Nico Tonozzi (@nicot)](https://github.com/nicot): Register React file extensions [PR monaco-typescript#12](https://github.com/Microsoft/monaco-typescript/pull/12) + * [Jeong Woo Chang (@inspiredjw)](https://github.com/inspiredjw): Cannot read property 'uri' of null fix [PR vscode#13263](https://github.com/Microsoft/vscode/pull/13263) + * [Jan Pilzer(@Hirse)](https://github.com/Hirse): Add YAML samples [PR monaco-editor#242](https://github.com/Microsoft/monaco-editor/pull/242) + +--- + +## [0.7.1] (07.10.2016) + - Bugfixes in monaco-html, including fixing formatting. + +--- + +## [0.7.0] (07.10.2016) + - Adopted TypeScript 2.0 in all the repos (also reflected in `monaco.d.ts`). + - Added YAML colorization support. + - Brought back the ability to use `editor.addAction()` and have the action show in the context menu. + - Web workers now get a nice label next to the script name. + +### API changes: + - settings: + - new values for `lineNumbers`: `'on' | 'off' | 'relative'` + - new values for `renderWhitespace`: `'none' | 'boundary' | 'all'` + - removed `model.setMode()`, as `IMode` will soon disappear from the API. + +### Debt work + - Removed HTML, razor, PHP and handlebars from `monaco-editor-core`: + - the `monaco-editor-core` is now finally language agnostic. + - coloring for HTML, razor, PHP and handlebars is now coming in from `monaco-languages`. + - language smarts for HTML, razor and handlebars now comes from `monaco-html`. + - Packaging improvements: + - thanks to the removal of the old languages from `monaco-editor-core`, we could improve the bundling and reduce the number of .js files we ship. + - we are thinking about simplifying this further in the upcoming releases. + +### Thank you + * [Sandy Armstrong (@sandyarmstrong)](https://github.com/sandyarmstrong): csharp: allow styling #r/#load [PR monaco-languages#9](https://github.com/Microsoft/monaco-languages/pull/9) + * [Nico Tonozzi (@nicot)](https://github.com/nicot): Go: add raw string literal syntax [PR monaco-languages#10](https://github.com/Microsoft/monaco-languages/pull/10) + * [Jason Killian (@JKillian)](https://github.com/JKillian): Add vmin and vmax CSS units [PR monaco-languages#11](https://github.com/Microsoft/monaco-languages/pull/11) + * [Jan Pilzer (@Hirse)](https://github.com/Hirse): YAML colorization [PR monaco-languages#12](https://github.com/Microsoft/monaco-languages/pull/12) + * [Sam El-Husseini (@microsoftsam)](https://github.com/microsoftsam): Using Cmd+Scroll to zoom on a mac [PR vscode#12477](https://github.com/Microsoft/vscode/pull/12477) + +--- + +## [0.6.1] (06.09.2016) + - Fixed regression where `editor.addCommand` was no longer working. + +--- + +## [0.6.0] (05.09.2016) +- This will be the last release that contains specific IE9 and IE10 fixes/workarounds. We will begin cleaning our code-base and remove them. +- We plan to adopt TypeScript 2.0, so this will be the last release where `monaco.d.ts` is generated by TypeScript 1.8. +- `javascript` and `typescript` language services: + - exposed API to get to the underlying language service. + - fixed a bug that prevented modifying `extraLibs`. +- Multiple improvements/bugfixes to the `css`, `less`, `scss` and `json` language services. +- Added support for ATS/Postiats. + +### API changes: + - settings: + - new: `mouseWheelZoom`, `wordWrap`, `snippetSuggestions`, `tabCompletion`, `wordBasedSuggestions`, `renderControlCharacters`, `renderLineHighlight`, `fontWeight`. + - removed: `tabFocusMode`, `outlineMarkers`. + - renamed: `indentGuides` -> `renderIndentGuides`, `referenceInfos` -> `codeLens` + - added `editor.pushUndoStop()` to explicitly push an undo stop + - added `suppressMouseDown` to `IContentWidget` + - added optional `resolveLink` to `ILinkProvider` + - removed `enablement`, `contextMenuGroupId` from `IActionDescriptor` + - removed exposed constants for editor context keys. + +### Notable bugfixes: + - Icons missing in the find widget in IE11 [#148](https://github.com/Microsoft/monaco-editor/issues/148) + - Multiple context menu issues + - Multiple clicking issues in IE11/Edge ([#137](https://github.com/Microsoft/monaco-editor/issues/137), [#118](https://github.com/Microsoft/monaco-editor/issues/118)) + - Multiple issues with the high-contrast theme. + - Multiple IME issues in IE11, Edge and Firefox. + +### Thank you + * [Pavel Kolev (@paveldk)](https://github.com/paveldk): Fix sending message to terminated worker [PR vscode#10833](https://github.com/Microsoft/vscode/pull/10833) + * [Pavel Kolev (@paveldk)](https://github.com/paveldk): Export getTypeScriptWorker & getJavaScriptWorker to monaco.languages.typescript [PR monaco-typescript#8](https://github.com/Microsoft/monaco-typescript/pull/8) + * [Sandy Armstrong (@sandyarmstrong)](https://github.com/sandyarmstrong): Support CompletionItemKind.Method. [PR vscode#10225](https://github.com/Microsoft/vscode/pull/10225) + * [Sandy Armstrong (@sandyarmstrong)](https://github.com/sandyarmstrong): Fix show in IE11 [PR vscode#10309](https://github.com/Microsoft/vscode/pull/10309) + * [Sandy Armstrong (@sandyarmstrong)](https://github.com/sandyarmstrong): Correct docs for IEditorScrollbarOptions.useShadows [PR vscode#11312](https://github.com/Microsoft/vscode/pull/11312) + * [Artyom Shalkhakov (@ashalkhakov)](https://github.com/ashalkhakov): Adding support for ATS/Postiats [PR monaco-languages#5](https://github.com/Microsoft/monaco-languages/pull/5) + +--- + +## [0.5.1] (24.06.2016) + +- Fixed mouse handling in IE + +--- + +## [0.5.0] (24.06.2016) + +### Breaking changes +- `monaco.editor.createWebWorker` now loads the AMD module and calls `create` and passes in as first argument a context of type `monaco.worker.IWorkerContext` and as second argument the `initData`. This **breaking change** was needed to allow handling the case of misconfigured web workers (running on a file protocol or the cross-domain case) +- the `CodeActionProvider.provideCodeActions` now gets passed in a `CodeActionContext` that contains the markers at the relevant range. +- the `hoverMessage` of a decoration is now a `MarkedString | MarkedString[]` +- the `contents` of a `Hover` returned by a `HoverProvider` is now a `MarkedString | MarkedString[]` +- removed deprecated `IEditor.onDidChangeModelRawContent`, `IModel.onDidChangeRawContent` + +### Notable fixes +- Broken configurations (loading from `file://` or misconfigured cross-domain loading) now load the web worker code in the UI thread. This caused a **breaking change** in the behaviour of `monaco.editor.createWebWorker` +- The right-pointing mouse pointer is oversized in high DPI - [issue](https://github.com/Microsoft/monaco-editor/issues/5) +- The editor functions now correctly when hosted inside a `position:fixed` element. +- Cross-origin configuration is now picked up (as advertised in documentation from MonacoEnvironment) + +[0.14.3]: https://github.com/Microsoft/monaco-editor/compare/v0.14.2...v0.14.3 +[0.14.2]: https://github.com/Microsoft/monaco-editor/compare/v0.14.1...v0.14.2 +[0.14.1]: https://github.com/Microsoft/monaco-editor/compare/v0.14.0...v0.14.1 +[0.14.0]: https://github.com/Microsoft/monaco-editor/compare/v0.13.1...v0.14.0 +[0.13.1]: https://github.com/Microsoft/monaco-editor/compare/v0.13.0...v0.13.1 +[0.13.0]: https://github.com/Microsoft/monaco-editor/compare/v0.12.0...v0.13.0 +[0.12.0]: https://github.com/Microsoft/monaco-editor/compare/v0.11.1...v0.12.0 +[0.11.1]: https://github.com/Microsoft/monaco-editor/compare/v0.11.0...v0.11.1 +[0.11.0]: https://github.com/Microsoft/monaco-editor/compare/v0.10.1...v0.11.0 +[0.10.1]: https://github.com/Microsoft/monaco-editor/compare/v0.10.0...v0.10.1 +[0.10.0]: https://github.com/Microsoft/monaco-editor/compare/v0.9.0...v0.10.0 +[0.9.0]: https://github.com/Microsoft/monaco-editor/compare/v0.8.3...v0.9.0 +[0.8.3]: https://github.com/Microsoft/monaco-editor/compare/v0.8.2...v0.8.3 +[0.8.2]: https://github.com/Microsoft/monaco-editor/compare/v0.8.1...v0.8.2 +[0.8.1]: https://github.com/Microsoft/monaco-editor/compare/v0.8.0...v0.8.1 +[0.6.1]: https://github.com/Microsoft/monaco-editor/compare/v0.6.0...v0.6.1 +[0.6.0]: https://github.com/Microsoft/monaco-editor/compare/v0.5.1...v0.6.0 +[0.5.1]: https://github.com/Microsoft/monaco-editor/compare/v0.5.0...v0.5.1 diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/LICENSE b/apps/config_explorer/appserver/static/node_modules/monaco-editor/LICENSE new file mode 100755 index 00000000..094e88aa --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Microsoft Corporation + +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. diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/README.md b/apps/config_explorer/appserver/static/node_modules/monaco-editor/README.md new file mode 100755 index 00000000..e397e41f --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/README.md @@ -0,0 +1,100 @@ +# Monaco Editor + +[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3) + +The Monaco Editor is the code editor which powers [VS Code](https://github.com/Microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved). + +Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module. + +![image](https://cloud.githubusercontent.com/assets/5047891/19600675/5eaae9e6-97a6-11e6-97ad-93903167d8ba.png) + +## Try it out + +Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html). + +## Installing + +``` +$ npm install monaco-editor +``` + +You will get: +* inside `esm`: ESM version of the editor (compatible with e.g. webpack) +* inside `dev`: AMD bundled, not minified +* inside `min`: AMD bundled, and minified +* inside `min-maps`: source maps for `min` +* `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release). + +It is recommended to develop against the `dev` version, and in production to use the `min` version. + +## Documentation + +* Learn how to integrate the editor with these [complete samples](https://github.com/Microsoft/monaco-editor-samples/). + * [Integrate the AMD version](./docs/integrate-amd.md). + * [Integrate the AMD version cross-domain](./docs/integrate-amd-cross.md) + * [Integrate the ESM version](./docs/integrate-esm.md) +* Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html). +* Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/Microsoft/monaco-editor/blob/master/website/playground/monaco.d.ts.txt). +* Read [this guide](https://github.com/Microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users! +* Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html). +* Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there! + +## Issues + +Create [issues](https://github.com/Microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates. + +## Known issues +In IE 11, the editor must be surrounded in the body element, otherwise the hit testing performed for mouse operations does not work. You can inspect this using F12 and click on the body element and confirm that visually it surrounds the editor. + +## FAQ + +❓ **What is the relationship between VS Code and the Monaco Editor?** + +The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home. + +❓ **What is the relationship between VS Code's version and the Monaco Editor's version?** + +None. The Monaco Editor is a library and it reflects directly the source code. + +❓ **I've written an extension for VS Code, will it work on the Monaco Editor in a browser?** + +No. + +> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible. + +❓ **Why all these web workers and why should I care?** + +Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case). + +❓ **What is this `loader.js`? Can I use `require.js`?** + +It is an AMD loader that we use in VS Code. Yes. + +❓ **I see the warning "Could not create web worker". What should I do?** + +HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. Please also see the cross-domain case above. + +❓ **Is the editor supported in mobile browsers or mobile web app frameworks?** + +No. + +❓ **Why doesn't the editor support TextMate grammars?** + +* All the regular expressions in TM grammars are based on [oniguruma](https://github.com/kkos/oniguruma), a regular expression library written in C. +* The only way to interpret the grammars and get anywhere near original fidelity is to use the exact same regular expression library (with its custom syntax constructs). +* In VSCode, our runtime is node.js and we can use a node native module that exposes the library to JavaScript. +* In Monaco, we are constrained to a browser environment where we cannot do anything similar. +* We have experimented with Emscripten to compile the C library to asm.js, but performance was very poor even in Firefox (10x slower) and extremely poor in Chrome (100x slower). +* We can revisit this once WebAssembly gets traction in the major browsers, but we will still need to consider the browser matrix we support, i.e. if we support IE11 and only Edge will add WebAssembly support, what will the experience be in IE11, etc. + +## Development setup + +Please see [CONTRIBUTING](./CONTRIBUTING.md) + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + + +## License +Licensed under the [MIT](https://github.com/Microsoft/monaco-editor/blob/master/LICENSE.md) License. diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf new file mode 100755 index 00000000..a51c2846 Binary files /dev/null and b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf differ diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/worker/workerMain.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/worker/workerMain.js new file mode 100755 index 00000000..c448e8f9 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/base/worker/workerMain.js @@ -0,0 +1,162 @@ +/*!----------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.19.3(4bbae4b7d81ecff78ba65ddc8227b542e734257e) + * Released under the MIT license + * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt + *-----------------------------------------------------------*/ +(function(){ +var e,t,n=["require","exports","vs/editor/common/core/position","vs/base/common/errors","vs/base/common/platform","vs/editor/common/core/range","vs/base/common/diff/diff","vs/base/common/iterator","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/types","vs/base/common/uint","vs/base/common/uri","vs/base/common/arrays","vs/base/common/diff/diffChange","vs/base/common/functional","vs/base/common/hash","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/common/cancellation","vs/base/common/strings","vs/editor/common/core/characterClassifier","vs/editor/common/core/selection","vs/editor/common/core/token","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneEnums","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/base/common/worker/simpleWorker","vs/editor/common/standalone/promise-polyfill/polyfill","vs/editor/common/services/editorSimpleWorker"],r=function(e){ +for(var t=[],r=0,i=e.length;r=0)||"undefined"!=typeof process&&"win32"===process.platform},t}();e.Environment=t}(t||(t={})),function(e){var t=function(e,t,n){this.type=e,this.detail=t,this.timestamp=n};e.LoaderEvent=t;var n=function(){function n(e){this._events=[new t(1,"",e)]}return n.prototype.record=function(n,r){this._events.push(new t(n,r,e.Utilities.getHighPerformanceTimestamp()))},n.prototype.getEvents=function(){return this._events},n}();e.LoaderEventRecorder=n;var r=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e.INSTANCE=new e,e}();e.NullLoaderEventRecorder=r}(t||(t={})),function(e){var t=function(){function t(){} +return t.fileUriToFilePath=function(e,t){if(t=decodeURI(t).replace(/%23/g,"#"),e){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var n=void 0;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},t.isEmpty=function(e){var n=!0;return t.forEachProperty(e,(function(){n=!1})),n},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var n=Array.isArray(e)?[]:{};return t.forEachProperty(e,(function(e,r){n[e]=r&&"object"==typeof r?t.recursiveClone(r):r})),n},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID+++"==="}, +t.isAnonymousModule=function(e){return t.startsWith(e,"===anonymous")},t.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=e.global.performance&&"function"==typeof e.global.performance.now),this.HAS_PERFORMANCE_NOW?e.global.performance.now():Date.now()},t.NEXT_ANONYMOUS_ID=1,t.PERFORMANCE_NOW_PROBED=!1,t.HAS_PERFORMANCE_NOW=!1,t}();e.Utilities=t}(t||(t={})),function(e){function t(e){if(e instanceof Error)return e;var t=new Error(e.message||String(e)||"Unknown Error");return e.stack&&(t.stack=e.stack),t}e.ensureError=t;var n=function(){function n(){}return n.validateConfigurationOptions=function(n){if("string"!=typeof(n=n||{}).baseUrl&&(n.baseUrl=""),"boolean"!=typeof n.isBuild&&(n.isBuild=!1),"object"!=typeof n.paths&&(n.paths={}),"object"!=typeof n.config&&(n.config={}),void 0===n.catchError&&(n.catchError=!1),void 0===n.recordStats&&(n.recordStats=!1),"string"!=typeof n.urlArgs&&(n.urlArgs=""), +"function"!=typeof n.onError&&(n.onError=function(e){return"loading"===e.phase?(console.error('Loading "'+e.moduleId+'" failed'),console.error(e),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.phase?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),void console.error(e)):void 0}),Array.isArray(n.ignoreDuplicateModules)||(n.ignoreDuplicateModules=[]),n.baseUrl.length>0&&(e.Utilities.endsWith(n.baseUrl,"/")||(n.baseUrl+="/")),"string"!=typeof n.cspNonce&&(n.cspNonce=""),Array.isArray(n.nodeModules)||(n.nodeModules=[]),n.nodeCachedData&&"object"==typeof n.nodeCachedData&&("string"!=typeof n.nodeCachedData.seed&&(n.nodeCachedData.seed="seed"),("number"!=typeof n.nodeCachedData.writeDelay||n.nodeCachedData.writeDelay<0)&&(n.nodeCachedData.writeDelay=7e3),!n.nodeCachedData.path||"string"!=typeof n.nodeCachedData.path)){var r=t(new Error("INVALID cached data configuration, 'path' MUST be set"));r.phase="configuration", +n.onError(r),n.nodeCachedData=void 0}return n},n.mergeConfigurationOptions=function(t,r){void 0===t&&(t=null),void 0===r&&(r=null);var i=e.Utilities.recursiveClone(r||{});return e.Utilities.forEachProperty(t,(function(t,n){"ignoreDuplicateModules"===t&&void 0!==i.ignoreDuplicateModules?i.ignoreDuplicateModules=i.ignoreDuplicateModules.concat(n):"paths"===t&&void 0!==i.paths?e.Utilities.forEachProperty(n,(function(e,t){return i.paths[e]=t})):"config"===t&&void 0!==i.config?e.Utilities.forEachProperty(n,(function(e,t){return i.config[e]=t})):i[t]=e.Utilities.recursiveClone(n)})),n.validateConfigurationOptions(i)},n}();e.ConfigurationOptionsUtil=n;var r=function(){function t(e,t){if(this._env=e,this.options=n.mergeConfigurationOptions(t),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),""===this.options.baseUrl){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){ +var r=this.options.nodeRequire.main.filename,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}if(this.options.nodeMain&&this._env.isNode){r=this.options.nodeMain,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}}}return t.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e=5||(s=o.length,i._fs.writeFile(n,Buffer.concat([a,o]),(function(e){e&&r.getConfig().onError(e),r.getRecorder().record(63,n),l()})))}),o*Math.pow(4,u++))};l()},t.prototype._readSourceAndCachedData=function(e,t,n,r){if(t){var i=void 0,o=void 0,s=void 0,u=2,a=function(e){e?r(e):0==--u&&r(void 0,i,o,s)};this._fs.readFile(e,{encoding:"utf8"},(function(e,t){i=t,a(e)})),this._fs.readFile(t,(function(e,r){!e&&r&&r.length>0?(s=r.slice(0,16),o=r.slice(16),n.record(60,t)):n.record(61,t),a()}))}else this._fs.readFile(e,{encoding:"utf8"},r)},t.prototype._verifyCachedData=function(e,t,n,r){var i=this;r&&(e.cachedDataRejected||setTimeout((function(){var e=i._crypto.createHash("md5").update(t,"utf8").digest() +;r.equals(e)||(console.warn("FAILED TO VERIFY CACHED DATA. Deleting '"+n+"' now, but a RESTART IS REQUIRED"),i._fs.unlink(n,(function(e){return console.error("FAILED to unlink: '"+n+"'",e)})))}),Math.ceil(5e3*(1+Math.random()))))},t._BOM=65279,t._PREFIX="(function (require, define, __filename, __dirname) { ",t._SUFFIX="\n});",t}();e.createScriptLoader=function(e){return new t(e)}}(t||(t={})),function(e){var t=function(){function t(e){var t=e.lastIndexOf("/");this.fromModulePath=-1!==t?e.substr(0,t+1):""}return t._normalizeModuleId=function(e){var t,n=e;for(t=/\/\.\//;t.test(n);)n=n.replace(t,"/");for(n=n.replace(/^\.\//g,""),t=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;t.test(n);)n=n.replace(t,"/");return n=n.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,"")},t.prototype.resolveModule=function(n){var r=n +;return e.Utilities.isAbsolutePath(r)||(e.Utilities.startsWith(r,"./")||e.Utilities.startsWith(r,"../"))&&(r=t._normalizeModuleId(this.fromModulePath+r)),r},t.ROOT=new t(""),t}();e.ModuleIdResolver=t;var n=function(){function t(e,t,n,r,i,o){this.id=e,this.strId=t,this.dependencies=n,this._callback=r,this._errorback=i,this.moduleIdResolver=o,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return t._safeInvokeFunction=function(t,n){try{return{returnedValue:t.apply(e.global,n),producedError:null}}catch(e){return{returnedValue:null,producedError:e}}},t._invokeFactory=function(t,n,r,i){return t.isBuild()&&!e.Utilities.isAnonymousModule(n)?{returnedValue:null,producedError:null}:t.shouldCatchError()?this._safeInvokeFunction(r,i):{returnedValue:r.apply(e.global,i),producedError:null}},t.prototype.complete=function(n,r,i){this._isComplete=!0;var o=null;if(this._callback)if("function"==typeof this._callback){n.record(21,this.strId) +;var s=t._invokeFactory(r,this.strId,this._callback,i);o=s.producedError,n.record(22,this.strId),o||void 0===s.returnedValue||this.exportsPassedIn&&!e.Utilities.isEmpty(this.exports)||(this.exports=s.returnedValue)}else this.exports=this._callback;if(o){var u=e.ensureError(o);u.phase="factory",u.moduleId=this.strId,this.error=u,r.onError(u)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},t.prototype.onDependencyError=function(e){return this._isComplete=!0,this.error=e,!!this._errorback&&(this._errorback(e),!0)},t.prototype.isComplete=function(){return this._isComplete},t}();e.Module=n;var r=function(){function e(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return e.prototype.getMaxModuleId=function(){return this._nextId},e.prototype.getModuleId=function(e){var t=this._strModuleIdToIntModuleId.get(e);return void 0===t&&(t=this._nextId++, +this._strModuleIdToIntModuleId.set(e,t),this._intModuleIdToStrModuleId[t]=e),t},e.prototype.getStrModuleId=function(e){return this._intModuleIdToStrModuleId[e]},e}(),i=function(){function e(e){this.id=e}return e.EXPORTS=new e(0),e.MODULE=new e(1),e.REQUIRE=new e(2),e}();e.RegularDependency=i;var o=function(e,t,n){this.id=e,this.pluginId=t,this.pluginParam=n};e.PluginDependency=o;var s=function(){function s(t,n,i,o,s){void 0===s&&(s=0),this._env=t,this._scriptLoader=n,this._loaderAvailableTimestamp=s,this._defineFunc=i,this._requireFunc=o,this._moduleIdProvider=new r,this._config=new e.Configuration(this._env),this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return s.prototype.reset=function(){return new s(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}, +s.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},s.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},s._findRelevantLocationInStack=function(e,t){for(var n=function(e){return e.replace(/\\/g,"/")},r=n(e),i=t.split(/\n/),o=0;o=0){var r=t.resolveModule(e.substr(0,n)),s=t.resolveModule(e.substr(n+1)),u=this._moduleIdProvider.getModuleId(r+"!"+s),a=this._moduleIdProvider.getModuleId(r);return new o(u,a,s)}return new i(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},s.prototype._normalizeDependencies=function(e,t){for(var n=[],r=0,i=0,o=e.length;i0;){var l=a.shift(),c=this._modules2[l];c&&(u=c.onDependencyError(r)||u);var d=this._inverseDependencies2[l];if(d)for(o=0,s=d.length;o0;){var u=s.shift().dependencies;if(u)for(i=0,o=u.length;i=r.length)t._onLoadError(e,n);else{var s=r[i],u=t.getRecorder() +;if(t._config.isBuild()&&"empty:"===s)return t._buildInfoPath[e]=s,t.defineModule(t._moduleIdProvider.getStrModuleId(e),[],null,null,null),void t._onLoad(e);u.record(10,s),t._scriptLoader.load(t,s,(function(){t._config.isBuild()&&(t._buildInfoPath[e]=s),u.record(11,s),t._onLoad(e)}),(function(e){u.record(12,s),o(e)}))}};o(null)}},s.prototype._loadPluginDependency=function(e,n){var r=this;if(!this._modules2[n.id]&&!this._knownModules2[n.id]){this._knownModules2[n.id]=!0;var i=function(e){r.defineModule(r._moduleIdProvider.getStrModuleId(n.id),[],e,null,null)};i.error=function(e){r._config.onError(r._createLoadError(n.id,e))},e.load(n.pluginParam,this._createRequire(t.ROOT),i,this._config.getOptionsLiteral())}},s.prototype._resolve=function(e){var t=this,n=e.dependencies;if(n)for(var r=0,s=n.length;r \n")),e.unresolvedDependenciesCount--}else if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(e.id),u instanceof o){var c=this._modules2[u.pluginId];if(c&&c.isComplete()){this._loadPluginDependency(c.exports,u);continue}var d=this._inversePluginDependencies2.get(u.pluginId);d||(d=[],this._inversePluginDependencies2.set(u.pluginId,d)),d.push(u),this._loadModule(u.pluginId)}else this._loadModule(u.id)}else e.unresolvedDependenciesCount--;else e.unresolvedDependenciesCount--;else e.exportsPassedIn=!0,e.unresolvedDependenciesCount--} +0===e.unresolvedDependenciesCount&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,n=this.getRecorder();if(!e.isComplete()){var r=e.dependencies,o=[];if(r)for(var s=0,u=r.length;sr?e[a]=o[u++]:u>i?e[a]=o[s++]:t(o[u],o[s])<0?e[a]=o[u++]:e[a]=o[s++]}(t,n,r,s,i,o)}(e,t,0,e.length-1,[]),e}function r(e,t){for(var n=0;n0))return o;i=o-1}}return-(r+1)},t.findFirstInSorted=function(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n0},t.distinct=function(e,t){if(!t)return e.filter((function(t,n){return e.indexOf(t)===n}));var n=Object.create(null);return e.filter((function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)}))},t.distinctES6=function(e){var t=new Set;return e.filter((function(e){return!t.has(e)&&(t.add(e),!0)}))},t.fromSet=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},t.firstIndex=r,t.first=function(e,t,n){void 0===n&&(n=void 0);var i=r(e,t);return i<0?n:e[i]},t.firstOrDefault=function(e,t){return e.length>0?e[0]:t},t.flatten=function(e){var t;return(t=[]).concat.apply(t,e)},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(var i=n;it;i--)r.push(i);return r}, +t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)},t.pushToStart=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))},t.find=function(e,t){for(var n=0;n0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)), +this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),a=function(){function e(t,n,r){void 0===r&&(r=null),this.ContinueProcessingPredicate=r;var i=e._getElements(t),o=i[0],s=i[1],u=i[2],a=e._getElements(n),l=a[0],c=a[1],d=a[2];this._hasStrings=u&&d,this._originalStringElements=o,this._originalElementsOrHash=s, +this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"==typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),o=0,s=n.length;o=e&&i>=r&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||r>i){var u=void 0;return r<=i?(o.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new n.DiffChange(e,0,r,i-r+1)]):e<=t?(o.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new n.DiffChange(e,t-e+1,r,0)]):(o.Assert(e===t+1,"originalStart should only be one more than originalEnd"), +o.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}var a=[0],l=[0],c=this.ComputeRecursionPoint(e,t,r,i,a,l,s),d=a[0],f=l[0];if(null!==c)return c;if(!s[0]){var h=this.ComputeDiffRecursive(e,d,r,f,s),p=[];return p=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,f+1,i-(f+1)+1)]:this.ComputeDiffRecursive(d+1,t,f+1,i,s),this.ConcatenateChanges(h,p)}return[new n.DiffChange(e,t-e+1,r,i-r+1)]},e.prototype.WALKTRACE=function(e,t,r,i,o,s,a,l,c,d,f,h,p,m,g,v,_,y){var b,C=null,E=new u,S=t,L=r,N=p[0]-v[0]-i,M=-1073741824,A=this.m_forwardHistory.length-1;do{(P=N+e)===S||P=0&&(e=(c=this.m_forwardHistory[A])[0],S=1,L=c.length-1)}while(--A>=-1);if(b=E.getReverseChanges(),y[0]){var w=p[0]+1,I=v[0]+1;if(null!==b&&b.length>0){var D=b[b.length-1];w=Math.max(w,D.getOriginalEnd()),I=Math.max(I,D.getModifiedEnd())} +C=[new n.DiffChange(w,h-w+1,I,g-I+1)]}else{E=new u,S=s,L=a,N=p[0]-v[0]-l,M=1073741824,A=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var P;(P=N+o)===S||P=d[P+1]?(m=(f=d[P+1]-1)-N-l,f>M&&E.MarkNextChange(),M=f+1,E.AddOriginalElement(f+1,m+1),N=P+1-o):(m=(f=d[P-1])-N-l,f>M&&E.MarkNextChange(),M=f,E.AddModifiedElement(f+1,m+1),N=P-1-o),A>=0&&(o=(d=this.m_reverseHistory[A])[0],S=1,L=d.length-1)}while(--A>=-1);C=E.getChanges()}return this.ConcatenateChanges(b,C)},e.prototype.ComputeRecursionPoint=function(e,t,r,i,o,u,a){var l=0,c=0,d=0,f=0,h=0,p=0;e--,r--,o[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m=t-e+(i-r),g=m+1,v=new Int32Array(g),_=new Int32Array(g),y=i-r,b=t-e,C=e-r,E=t-i,S=(b-y)%2==0;v[y]=e,_[b]=t,a[0]=!1;for(var L=1;L<=m/2+1;L++){var N=0,M=0;d=this.ClipDiagonalBound(y-L,L,y,g),f=this.ClipDiagonalBound(y+L,L,y,g);for(var A=d;A<=f;A+=2){c=(l=A===d||AN+M&&(N=l,M=c),!S&&Math.abs(A-b)<=L-1&&l>=_[A])return o[0]=l,u[0]=c,w<=_[A]&&L<=1448?this.WALKTRACE(y,d,f,C,b,h,p,E,v,_,l,t,o,c,i,u,S,a):null}var I=(N-e+(M-r)-L)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(N,I))return a[0]=!0,o[0]=N,u[0]=M,I>0&&L<=1448?this.WALKTRACE(y,d,f,C,b,h,p,E,v,_,l,t,o,c,i,u,S,a):(e++,r++,[new n.DiffChange(e,t-e+1,r,i-r+1)]);h=this.ClipDiagonalBound(b-L,L,b,g),p=this.ClipDiagonalBound(b+L,L,b,g);for(A=h;A<=p;A+=2){c=(l=A===h||A=_[A+1]?_[A+1]-1:_[A-1])-(A-b)-E;for(w=l;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(_[A]=l,S&&Math.abs(A-y)<=L&&l<=v[A])return o[0]=l,u[0]=c,w>=v[A]&&L<=1448?this.WALKTRACE(y,d,f,C,b,h,p,E,v,_,l,t,o,c,i,u,S,a):null}if(L<=1447){var D=new Int32Array(f-d+2);D[0]=y-d+1,s.Copy2(v,d,D,1,f-d+1),this.m_forwardHistory.push(D),(D=new Int32Array(p-h+2))[0]=b-h+1,s.Copy2(_,h,D,1,p-h+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(y,d,f,C,b,h,p,E,v,_,l,t,o,c,i,u,S,a)}, +e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],r=0,i=0;if(t>0){var a=e[t-1];a.originalLength>0&&(r=a.originalStart+a.originalLength),a.modifiedLength>0&&(i=a.modifiedStart+a.modifiedLength)}o=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var f=n.originalStart-d,h=n.modifiedStart-d +;if(fc&&(c=p,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t +;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return s.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],s.Copy(t,1,r,e.length,t.length-1),r}r=new Array(e.length+t.length);return s.Copy(e,0,r,0,e.length),s.Copy(t,0,r,e.length,t.length),r},e.prototype.ChangesOverlap=function(e,t,r){if(o.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),o.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,s=e.originalLength,u=e.modifiedStart,a=e.modifiedLength +;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),r[0]=new n.DiffChange(i,s,u,a),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e=r?t.FIN:{done:!1,value:e[n++]}}}},e.fromNativeIterator=function(e){return{next:function(){var n=e.next();return n.done?t.FIN:{done:!1,value:n.value}}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,n){return{next:function(){var r=e.next();return r.done?t.FIN:{done:!1,value:n(r.value)}}}},e.filter=function(e,n){return{next:function(){for(;;){var r=e.next();if(r.done)return t.FIN;if(n(r.value))return{done:!1,value:r.value}}}}},e.forEach=function(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)},e.collect=function(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY);var n=[];if(0===t)return n;for(var r=0,i=e.next();!i.done&&(n.push(i.value),!(++r>=t));i=e.next());return n},e.concat=function(){for(var e=[],n=0;n=e.length)return t.FIN +;var n=e[r].next();return n.done?(r++,this.next()):n}}},e.chain=function(e){return new r(e)}}(n=t.Iterator||(t.Iterator={}));var r=function(){function e(e){this.it=e}return e.prototype.next=function(){return this.it.next()},e}();t.ChainableIterator=r,t.getSequenceIterator=function(e){return Array.isArray(e)?n.fromArray(e):e||n.empty()};var i=function(){function e(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===r&&(r=t-1),this.items=e,this.start=t,this.end=n,this.index=r}return e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}();t.ArrayIterator=i;var o=function(e){function t(t,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=t.length),void 0===i&&(i=n-1),e.call(this,t,n,r,i)||this}return a(t,e),t.prototype.current=function(){return e.prototype.current.call(this)}, +t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(i);t.ArrayNavigator=o;var s=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}();t.MappedIterator=s})),e(n[17],r([0,1,3]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),i=new r,o=new r,s=new r;function u(e,t){var n=!!(2048&e),r=!!(256&e) +;return new a(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),i.define(e,t),o.define(e,n),s.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"), +e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return i.keyCodeToStr(e)},e.fromString=function(e){return i.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return s.keyCodeToStr(e)}, +e.fromUserSettings=function(e){return o.strToKeyCode(e)||s.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var n=(65535&e)>>>0,r=(4294901760&e)>>>16;return new l(0!==r?[u(n,t),u(r,t)]:[u(n,t)])},t.createSimpleKeybinding=u;var a=function(){function e(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}return e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.toChord=function(){return new l([this])},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}() +;t.SimpleKeybinding=a;var l=function(){function e(e){if(0===e.length)throw n.illegalArgument("parts");this.parts=e}return e.prototype.equals=function(e){if(null===e)return!1;if(this.parts.length!==e.parts.length)return!1;for(var t=0;t1)&&l.fire(e),a=0}),n)}))},onLastListenerRemove:function(){o.dispose()}});return l.event}function l(e){var t,n=!0;return o(e,(function(e){var r=n||e!==t +;return n=!1,t=e,r}))}e.None=function(){return i.Disposable.None},e.once=t,e.map=n,e.forEach=r,e.filter=o,e.signal=function(e){return e},e.any=function(){for(var e=[],t=0;t0?new l(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,s){t._listeners||(t._listeners=new o.LinkedList);var u=t._listeners.isEmpty();u&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var a,l,c=t._listeners.push(r?[n,r]:n);return u&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t), +t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r),t._leakageMon&&(a=t._leakageMon.check(t._listeners.size)),l={dispose:function(){(a&&a(),l.dispose=e._noop,t._disposed)||(c(),t._options&&t._options.onLastListenerRemove&&(t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)))}},s instanceof i.DisposableStore?s.add(l):Array.isArray(s)&&s.push(l),l}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new o.LinkedList);for(var t=this._listeners.iterator(),r=t.next();!r.done;r=t.next())this._deliveryQueue.push([r.value,e]);for(;this._deliveryQueue.size>0;){var i=this._deliveryQueue.shift(),s=i[0],u=i[1];try{"function"==typeof s?s.call(void 0,u):s[0].call(s[1],u)}catch(r){n.onUnexpectedError(r)}}}},e.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}, +e._noop=function(){},e}();t.Emitter=c;var d=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaused=0,n._eventQueue=new o.LinkedList,n._mergeFn=t&&t.merge,n}return a(t,e),t.prototype.pause=function(){this._isPaused++},t.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var t=this._eventQueue.toArray();this._eventQueue.clear(),e.prototype.fire.call(this,this._mergeFn(t))}else for(;!this._isPaused&&0!==this._eventQueue.size;)e.prototype.fire.call(this,this._eventQueue.shift())},t.prototype.fire=function(t){this._listeners&&(0!==this._isPaused?this._eventQueue.push(t):e.prototype.fire.call(this,t))},t}(c);t.PauseableEmitter=d;var f=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new c({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0, +configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return i.toDisposable(r.once((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=f;var h=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e((function(e){var i=t.buffers[t.buffers.length-1];i?i.push((function(){return n.call(r,e)})):n.call(r,e)}),void 0,i) +}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach((function(e){return e()})),n},e}();t.EventBufferer=h;var p=function(){function e(){var e=this;this.listening=!1,this.inputEvent=s.None,this.inputEventListener=i.Disposable.None,this.emitter=new c({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},e}();t.Relay=p})),e(n[19],r([0,1,9]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze((function(e,t){ +var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof o||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1,this._emitter=null}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter), +this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)},e}(),s=function(){function e(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(e){void 0===e&&(e=!1),e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=r.None},e}();t.CancellationTokenSource=s})),e(n[4],r([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) +;var n=!1,r=!1,i=!1,o=!1,s=!1,u=!1,a=void 0,l="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||l){if("object"==typeof process){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform,"en","en";var c=process.env.VSCODE_NLS_CONFIG;if(c)try{var d=JSON.parse(c),f=d.availableLanguages["*"];d.locale,f||"en",d._translationsConfigFile}catch(e){}o=!0}}else n=(a=navigator.userAgent).indexOf("Windows")>=0,r=a.indexOf("Macintosh")>=0,u=a.indexOf("Macintosh")>=0&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,i=a.indexOf("Linux")>=0,s=!0,navigator.language;t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isNative=o,t.isWeb=s,t.isIOS=u;var h="object"==typeof self?self:"object"==typeof global?global:{};t.globals=h,t.setImmediate=function(){if(t.globals.setImmediate)return t.globals.setImmediate.bind(t.globals);if("function"==typeof t.globals.postMessage&&!t.globals.importScripts){var e=[] +;t.globals.addEventListener("message",(function(t){if(t.data&&t.data.vscodeSetImmediateId)for(var n=0,r=e.length;nt?1:0}function u(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function l(e){return u(e)||a(e)}function c(e,t,n){void 0===n&&(n=e.length);for(var r=0;r1){var r=e.charCodeAt(t-2);if(d(r))return n-56320+(r-55296<<10)+65536}return n}function m(e,t){ +var n=C.getInstance(),r=e.length,i=t,o=h(e,r,t),s=n.getGraphemeBreakType(o);t+=o>=65536?2:1;for(var u=s;t=65536?2:1,u=l}var c=t;for(t=i,u=s;t>0;){var d=p(e,t),f=n.getGraphemeBreakType(d);if(b(f,u))break;t-=d>=65536?2:1,u=f}return[t,c]}t.format=function(e){for(var t=[],r=1;r=t.length?e:t[r]}))},t.escape=function(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))},t.escapeRegExpCharacters=r,t.trim=function(e,t){return void 0===t&&(t=" "),o(i(e,t),t)},t.ltrim=i,t.rtrim=o,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=r(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;rt.length?1:0},t.isLowerAsciiLetter=u,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){return e.length===t.length&&c(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&c(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n=65536?2:1;for(var s=n.getGraphemeBreakType(o);t=65536?2:1,s=a}return t-r},t.prevCharLength=function(e,t){var n=C.getInstance(),r=t,i=p(e,t);t-=i>=65536?2:1;for(var o=n.getGraphemeBreakType(i);t>0;){var s=p(e,t),u=n.getGraphemeBreakType(s);if(b(u,o))break;t-=s>=65536?2:1,o=u}return r-t},t.getCharContainingOffset=function(e,t){return t>0&&f(e.charCodeAt(t))?m(e,t-1):m(e,t)} +;var g=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return g.test(e)};var v=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;t.containsEmoji=function(e){return v.test(e)};var _=/^[\t\n\r\x20-\x7E]*$/;function y(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function b(e,t){ +return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}t.isBasicASCII=function(e){return _.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=function(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;rt[3*r+1]))return t[3*r+2];r=2*r+1}return 0},e._INSTANCE=null,e}()})),e(n[10],r([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function r(e){return typeof e===n.string||e instanceof String}function i(e){return!(typeof e!==n.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===n.undefined}function s(e){return o(e)||null===e}t.isArray=function(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==n.number||e.constructor!==Array)},t.isString=r,t.isObject=i,t.isNumber=function(e){return(typeof e===n.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){ +return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=s,t.assertType=function(e,t){if(!e)throw new Error(t?"Unexpected type, expected '"+t+"'":"Unexpected type")};var u=Object.prototype.hasOwnProperty;function a(e){return typeof e===n.function}function l(e,t){if(r(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(a(t)){try{if(e instanceof t)return}catch(e){}if(!s(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function c(e){for(var t=[],n=Object.getPrototypeOf(e);Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(u.call(e,t))return!1;return!0},t.isFunction=a,t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0}),t.toUint8=function(e){return e<0?0:e>255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,r=new Uint32Array(t),i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=p[o] +;void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function g(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function _(e,t){var n=t?g:m,r="",i=e.scheme,o=e.authority,s=e.path,u=e.query,a=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=l,r+=l),o){var c=o.indexOf("@");if(-1!==c){var d=o.substr(0,c);o=o.substr(c+1),-1===(c=d.indexOf(":"))?r+=n(d,!1):(r+=n(d.substr(0,c),!1),r+=":",r+=n(d.substr(c+1),!1)),r+="@"} +-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(f=s.charCodeAt(1))>=65&&f<=90&&(s="/"+String.fromCharCode(f+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var f;(f=s.charCodeAt(0))>=65&&f<=90&&(s=String.fromCharCode(f+32)+":"+s.substr(2))}r+=n(s,!0)}return u&&(r+="?",r+=n(u,!1)),a&&(r+="#",r+=t?a:m(a,!1)),r}var y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(y)?e.replace(y,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}})),e(n[32],r([0,1,3,8,4,10]),(function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s="$initialize",u=!1;t.logOnceWebWorkerWarning=function(e){i.isWeb&&(u||(u=!0, +console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var l=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=this,r=String(++this._lastSentReq);return new Promise((function(i,o){n._pendingReplies[r]={resolve:i,reject:o},n._send({vsWorker:n._workerId,req:r,method:e,args:t})}))},e.prototype.handleMessage=function(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var r=e;if(!this._pendingReplies[r.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[r.seq];if(delete this._pendingReplies[r.seq],r.err){var o=r.err +;return r.err.$isError&&((o=new Error).name=r.err.name,o.message=r.err.message,o.stack=r.err.stack),void i.reject(o)}i.resolve(r.res)}else{var s=e,u=s.req;this._handler.handleMessage(s.method,s.args).then((function(e){t._send({vsWorker:t._workerId,seq:u,res:e,err:void 0})}),(function(e){e.detail instanceof Error&&(e.detail=n.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:u,res:void 0,err:n.transformErrorForSerialization(e)})}))}},e.prototype._send=function(e){var t=[];if(e.req)for(var n=e,r=0;r=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=r +;var i=function(){function e(){this._actual=new r(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=i})),e(n[2],r([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.with=function(t,n){return void 0===t&&(t=this.lineNumber),void 0===n&&(n=this.column),t===this.lineNumber&&n===this.column?this:new e(t,n)},e.prototype.delta=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),this.with(this.lineNumber+e,this.column+t)},e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumbern||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){ +return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.strictContainsRange=function(t){return e.strictContainsRange(this,t)},e.strictContainsRange=function(e,t){ +return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(r,i,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){ +var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,s=t.endColumn,u=n.startLineNumber,a=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(o=l,s=c):o===l&&(s=Math.min(s,c)),r>o?null:r===o&&i>s?null:new e(r,i,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){ +return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}();t.Range=r})),e(n[22],r([0,1,2,5]),(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r,i){ +var o=e.call(this,t,n,r,i)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=r,o.positionColumn=i,o}return a(t,e),t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){ +return new n.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&u()){var g=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),v=s.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),_=o(g,v,u,!0).changes;c&&(_=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,o=e.length;r1&&b>1;){if(v.charCodeAt(y-2)!==_.charCodeAt(b-2))break;y--,b--}(y>1||b>1)&&this._pushTrimWhitespaceCharChange(u,a+1,1,y,c+1,1,b) +;for(var C=f(v,1),E=f(_,1),S=v.length+1,L=_.length+1;C/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n="(-?\\d*\\.\\d\\w*)|([^",r=0,i=t.USUAL_WORD_SEPARATORS;r=0||(n+="\\"+o)}return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),n=new RegExp(e.source,r)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,n,r){t.lastIndex=0 +;var i=t.exec(n);if(!i)return null;var o=i[0].indexOf(" ")>=0?function(e,t,n,r){var i,o=e-1-r;for(t.lastIndex=0;i=t.exec(n);){var s=i.index||0;if(s>o)return null;if(t.lastIndex>=o)return{word:i[0],startColumn:r+1+s,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r):function(e,t,n,r){var i,o=e-1-r,s=n.lastIndexOf(" ",o-1)+1;for(t.lastIndex=s;i=t.exec(n);){var u=i.index||0;if(u<=o&&t.lastIndex>=o)return{word:i[0],startColumn:r+1+u,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r);return t.lastIndex=0,o}})),e(n[26],r([0,1,21]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){for(var r=new Uint8Array(e*t),i=0,o=e*t;it&&(t=c),u>n&&(n=u),(d=s[2])>n&&(n=d)} +var a=new r(++n,++t,0);for(i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}();t.StateMachine=i;var o=null;var s=null;var u=function(){function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>r);if(r>0){var u=t.charCodeAt(r-1),a=t.charCodeAt(o);(40===u&&41===a||91===u&&93===a||123===u&&125===a)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t,r){void 0===r&&(null===o&&(o=new i([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),r=o);for(var u=function(){if(null===s){s=new n.CharacterClassifier(0) +;for(var e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),a=[],l=1,c=t.getLineCount();l<=c;l++){for(var d=t.getLineContent(l),f=d.length,h=0,p=0,m=0,g=1,v=!1,_=!1,y=!1;h=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n})), +/*! +Copyright (c) 2014 Taylor Hakes +Copyright (c) 2014 Forbes Lindesay + */ +u=function(){"use strict";function e(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}var t=setTimeout;function n(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void s(t.promise,e)}o(t.promise,r)}else(1===e._state?o:s)(t.promise,e._value)}))):e._deferreds.push(t)}function o(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e) +;if("function"==typeof n)return void l((i=n,o=t,function(){i.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){s(e,t)}var i,o}function s(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=r.length)return!1;var o=r.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(r.length-t),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+t),e), +this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,i=0,o=0,s=0;t<=n;)if(i=t+(n-t)/2|0, +e<(s=(o=this.prefixSum[i])-this.values[i]))n=i-1;else{if(!(e>=o))break;t=i+1}return new r(i,e-s)},e}();t.PrefixSumComputer=i;var o=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new i(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=r._lines.length?i.FIN:(n=r._lines[o],u=r._wordenize(n,e),s=0,o+=1,a())};return{next:a}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],r=[],i=0,o=this._wordenize(n,t);ithis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)} +return r?{lineNumber:t,column:n}:e},t}(h.MirrorTextModel),b=function(){function t(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}return t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t},t.prototype.acceptNewModel=function(e){this._models[e.url]=new y(s.URI.parse(e.url),e.lines,e.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){this._models[e]&&this._models[e].onEvents(t)},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t.prototype.computeDiff=function(e,t,n,r){return l(this,void 0,void 0,(function(){var i,o,s,u,a,l,d;return c(this,(function(c){return i=this._getModel(e),o=this._getModel(t),i&&o?(s=i.getLinesContent(),u=o.getLinesContent(),a=new f.DiffComputer(s,u,{shouldComputeCharChanges:!0, +shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}),l=a.computeDiff(),d=!(l.changes.length>0)&&this._modelsAreIdentical(i,o),[2,{quitEarly:l.quitEarly,identical:d,changes:l.changes}]):[2,null]}))}))},t.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0},t.prototype.computeMoreMinimalEdits=function(e,i){return l(this,void 0,void 0,(function(){var o,s,u,a,l,f,h,p,m,g,v,_,y,b,C,E,S,L;return c(this,(function(c){if(!(o=this._getModel(e)))return[2,i];for(s=[],u=void 0,i=n.mergeSort(i,(function(e,t){return e.range&&t.range?d.Range.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)})),a=0,l=i;at._diffLimit)s.push({ +range:h,text:p});else for(v=r.stringDiff(g,p,!1),_=o.offsetAt(d.Range.lift(h).getStartPosition()),y=0,b=v;y0;)self.onmessage(r.shift())}),0)}))):r.push(e)}}()}).call(this); +//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/abap/abap.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/abap/abap.js new file mode 100755 index 00000000..1f5e8d5a --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/abap/abap.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/abap/abap",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]};n.language={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abstract","add","add-corresponding","adjacent","alias","aliases","all","append","appending","ascending","as","assert","assign","assigned","assigning","association","authority-check","back","begin","binary","block","bound","break-point","by","byte","class","call","cast","changing","check","class-data","class-method","class-methods","clear","close","cnt","collect","commit","cond","character","corresponding","communication","component","compute","concatenate","condense","constants","conv","count","controls","convert","create","currency","data","descending","default","define","deferred","delete","describe","detail","display","divide","divide-corresponding","display-mode","duplicates","deleting","editor-call","end","endexec","endfunction","ending","endmodule","end-of-definition","end-of-page","end-of-selection","end-test-injection","end-test-seam","exit-command","endclass","endmethod","endform","endinterface","endprovide","endselect","endtry","endwhile","enum","event","events","exec","exit","export","exporting","extract","exception","exceptions","field-symbols","field-groups","field","first","fetch","fields","format","frame","free","from","function","find","for","found","function-pool","generate","get","handle","hide","hashed","include","import","importing","index","infotypes","initial","initialization","id","is","in","interface","interfaces","init","input","insert","instance","into","key","left-justified","leave","like","line","line-count","line-size","load","local","log-point","length","left","leading","lower","matchcode","method","mesh","message","message-id","methods","modify","module","move","move-corresponding","multiply","multiply-corresponding","match","new","new-line","new-page","new-section","next","no","no-gap","no-gaps","no-sign","no-zero","non-unique","number","occurrence","object","obligatory","of","output","overlay","optional","others","occurrences","occurs","offset","options","pack","parameters","perform","places","position","print-control","private","program","protected","provide","public","put","radiobutton","raising","ranges","receive","receiving","redefinition","reduce","reference","refresh","regex","reject","results","requested","ref","replace","report","reserve","restore","result","return","returning","right-justified","rollback","read","read-only","rp-provide-from-last","run","scan","screen","scroll","search","select","select-options","selection-screen","stamp","source","subkey","separated","set","shift","single","skip","sort","sorted","split","standard","stamp","starting","start-of-selection","sum","subtract-corresponding","statics","step","stop","structure","submatches","submit","subtract","summary","supplied","suppress","section","syntax-check","syntax-trace","system-call","switch","tables","table","task","testing","test-seam","test-injection","then","time","times","title","titlebar","to","top-of-page","trailing","transfer","transformation","translate","transporting","types","type","type-pool","type-pools","unassign","unique","uline","unpack","update","upper","using","value","when","while","window","write","where","with","work","at","case","catch","continue","do","elseif","else","endat","endcase","enddo","endif","endloop","endon","if","loop","on","raise","try","abs","sign","ceil","floor","trunc","frac","acos","asin","atan","cos","sin","tan","cosh","sinh","tanh","exp","log","log10","sqrt","strlen","xstrlen","charlen","lines","numofchar","dbmaxlen","round","rescale","nmax","nmin","cmax","cmin","boolc","boolx","xsdbool","contains","contains_any_of","contains_any_not_of","matches","line_exists","ipow","char_off","count","count_any_of","count_any_not_of","distance","condense","concat_lines_of","escape","find","find_end","find_any_of","find_any_not_of","insert","match","repeat","replace","reverse","segment","shift_left","shift_right","substring","substring_after","substring_from","substring_before","substring_to","to_upper","to_lower","to_mixed","from_mixed","translate","bit-set","line_index","definition","implementation","public","inheriting","final"],typeKeywords:["abap_bool","string","xstring","any","clike","csequence","numeric","xsequence","c","n","i","p","f","d","t","x"],operators:["+","-","/","*","=","<",">","<=",">=","<>","><","=<","=>","EQ","NE","GE","LE","CS","CN","CA","CO","CP","NS","NA","NP"],symbols:/[=>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};var s=[];["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"].forEach((function(e){s.push(e),s.push(e.toUpperCase()),s.push(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e))})),t.language={defaultToken:"",tokenPostfix:".apex",keywords:s,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/azcli/azcli.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/azcli/azcli.js new file mode 100755 index 00000000..71ebf271 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/azcli/azcli.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/azcli/azcli",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#"}},t.language={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/bat/bat.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/bat/bat.js new file mode 100755 index 00000000..f8da2b83 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/bat/bat.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/bat/bat",["require","exports"],(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}]},t.language={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","begin","Bytes","Crypto","Current","else","end","failwith","false","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","Set","set","sender","source","String","then","true","type","with"],typeKeywords:["int","unit","string","tz"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/clojure/clojure.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/clojure/clojure.js new file mode 100755 index 00000000..e1c372b7 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/clojure/clojure.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/clojure/clojure",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},t.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/coffee/coffee.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/coffee/coffee.js new file mode 100755 index 00000000..754e3348 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/coffee/coffee.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/coffee/coffee",["require","exports"],(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csharp/csharp.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csharp/csharp.js new file mode 100755 index 00000000..08cb3bb6 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csharp/csharp.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/csharp/csharp",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t.language={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csp/csp.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csp/csp.js new file mode 100755 index 00000000..012b24e2 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/csp/csp.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/csp/csp",["require","exports"],(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={brackets:[],autoClosingPairs:[],surroundingPairs:[]},e.language={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js new file mode 100755 index 00000000..e3cd1d71 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/dockerfile/dockerfile",["require","exports"],(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s.language={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js new file mode 100755 index 00000000..7a4848b4 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/fsharp/fsharp",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},n.language={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/go/go.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/go/go.js new file mode 100755 index 00000000..62e58d77 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/go/go.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/go/go",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/graphql/graphql.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/graphql/graphql.js new file mode 100755 index 00000000..8582f884 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/graphql/graphql.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/graphql/graphql",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},n.language={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js new file mode 100755 index 00000000..0a70867b --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/handlebars/handlebars",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}]},t.language={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/html/html.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/html/html.js new file mode 100755 index 00000000..2a4c8eb4 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/html/html.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/html/html",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ini/ini.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ini/ini.js new file mode 100755 index 00000000..88210e89 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ini/ini.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/ini/ini",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/java/java.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/java/java.js new file mode 100755 index 00000000..5c1af4fb --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/java/java.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/java/java",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},t.language={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/javascript/javascript.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/javascript/javascript.js new file mode 100755 index 00000000..85e84fcb --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/javascript/javascript.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/typescript/typescript",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco;t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:n.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:n.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:n.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:n.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},t.language={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}})),define("vs/basic-languages/javascript/javascript",["require","exports","../typescript/typescript"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});"undefined"==typeof monaco?self.monaco:monaco;t.conf=n.conf,t.language={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:n.language.operators,symbols:n.language.symbols,escapes:n.language.escapes,digits:n.language.digits,octaldigits:n.language.octaldigits,binarydigits:n.language.binarydigits,hexdigits:n.language.hexdigits,regexpctl:n.language.regexpctl,regexpesc:n.language.regexpesc,tokenizer:n.language.tokenizer}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js new file mode 100755 index 00000000..2d6e7289 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/kotlin/kotlin",["require","exports"],(function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},i.language={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/less/less.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/less/less.js new file mode 100755 index 00000000..0dea79cd --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/less/less.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/less/less",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/lua/lua.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/lua/lua.js new file mode 100755 index 00000000..ecd1e9c0 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/lua/lua.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/lua/lua",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"variable.source",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/postiats/postiats.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/postiats/postiats.js new file mode 100755 index 00000000..c8203929 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/postiats/postiats.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/postiats/postiats",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},t.language={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js new file mode 100755 index 00000000..e29bab06 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/powerquery/powerquery",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},t.language={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powershell/powershell.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powershell/powershell.js new file mode 100755 index 00000000..7b62c650 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/powershell/powershell.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/powershell/powershell",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},n.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/pug/pug.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/pug/pug.js new file mode 100755 index 00000000..a82ec7b8 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/pug/pug.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/pug/pug",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},t.language={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redis/redis.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redis/redis.js new file mode 100755 index 00000000..5ee48959 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redis/redis.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/redis/redis",["require","exports"],(function(E,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},e.language={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redshift/redshift.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redshift/redshift.js new file mode 100755 index 00000000..b0b4518d --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/redshift/redshift.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/redshift/redshift",["require","exports"],(function(e,_){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.conf={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},_.language={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js new file mode 100755 index 00000000..10cd8731 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/restructuredtext/restructuredtext",["require","exports"],(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}},s.language={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,alphanumericsplus:/[A-Za-z0-9-_+:.]/,simpleRefNameWithoutBq:/(?:@alphanumerics@alphanumericsplus*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@simpleRefNameWithoutBq`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefName(?:\s@simpleRefName)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ruby/ruby.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ruby/ruby.js new file mode 100755 index 00000000..99704cf2 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/ruby/ruby.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/ruby/ruby",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp("^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|/).*\\4)*(#.*)?$"),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},t.language={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/rust/rust.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/rust/rust.js new file mode 100755 index 00000000..e965bab0 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/rust/rust.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/rust/rust",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},t.language={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","box","break","const","continue","crate","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'\S'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sb/sb.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sb/sb.js new file mode 100755 index 00000000..74328632 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sb/sb.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/sb/sb",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},o.language={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scheme/scheme.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scheme/scheme.js new file mode 100755 index 00000000..422fa4f0 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scheme/scheme.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/scheme/scheme",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},o.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scss/scss.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scss/scss.js new file mode 100755 index 00000000..886ea0c7 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/scss/scss.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/scss/scss",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".scss",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/shell/shell.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/shell/shell.js new file mode 100755 index 00000000..c00e0539 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/shell/shell.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/shell/shell",["require","exports"],(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},r.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],symbols:/[=>"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},e.language={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sophia/sophia.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sophia/sophia.js new file mode 100755 index 00000000..4f71bc53 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sophia/sophia.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/sophia/sophia",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},t.language={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sql/sql.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sql/sql.js new file mode 100755 index 00000000..370024d2 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/sql/sql.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/sql/sql",["require","exports"],(function(E,T){"use strict";Object.defineProperty(T,"__esModule",{value:!0}),T.conf={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},T.language={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/st/st.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/st/st.js new file mode 100755 index 00000000..28c4c887 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/st/st.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/st/st",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},n.language={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","сtu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/\@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/tcl/tcl.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/tcl/tcl.js new file mode 100755 index 00000000..0c419bb8 --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/tcl/tcl.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/tcl/tcl",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],["\x3c!--","--\x3e"],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},e.language={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/typescript/typescript.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/typescript/typescript.js new file mode 100755 index 00000000..a0ee7a9f --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/typescript/typescript.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/typescript/typescript",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco;t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:n.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:n.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:n.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:n.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},t.language={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}})); \ No newline at end of file diff --git a/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/vb/vb.js b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/vb/vb.js new file mode 100755 index 00000000..32a8a7ad --- /dev/null +++ b/apps/config_explorer/appserver/static/node_modules/monaco-editor/min/vs/basic-languages/vb/vb.js @@ -0,0 +1,7 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * monaco-languages version: 1.9.2(48bed9874ad53f221d1b60976b2ab3b964852472) + * Released under the MIT license + * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md + *-----------------------------------------------------------------------------*/ +define("vs/basic-languages/vb/vb",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},n.language={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=v({},t),t.gfm=v({},t.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=v({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=v({},t.normal,{ +html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var i,o,r,s,a,l,u,d,c,h,p,f,g,m,v,C;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:y(r,"\n") +});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2]?r[2].trim():r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if((r=this.rules.nptable.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),p=0;p ?/gm,""),this.token(r,n),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),u={type:"list_start",ordered:m=(s=r[2]).length>1,start:m?+s:"",loose:!1},this.tokens.push(u),d=[],i=!1,g=(r=r[0].match(this.rules.item)).length,p=0;p1?1===a.length:a.length>1||this.options.smartLists&&a!==s)&&(e=r.slice(p+1).join("\n")+e,p=g-1)),o=i||/\n\n(?!\s*$)/.test(l),p!==g-1&&(i="\n"===l.charAt(l.length-1),o||(o=i)),o&&(u.loose=!0),C=void 0,(v=/^\[[ xX]\] /.test(l))&&(C=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),c={type:"list_item_start",task:v,checked:C,loose:o},d.push(c),this.tokens.push(c),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(u.loose)for(g=d.length,p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:m,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, +strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:m,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",i.em=h(i.em).replace(/punctuation/g,i._punctuation).getRegex(),i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=h(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/, +i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=h(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=h(i.reflink).replace("label",i._label).getRegex(),i.normal=v({},i),i.pedantic=v({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=v({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/, +text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length), +l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):d(s[0]):s[0];else if(s=this.rules.link.exec(e)){var u=C(s[2],"()");if(u>-1){var c=s[0].length-(s[2].length-u)-(s[3]||"").length;s[2]=s[2].substring(0,u),s[0]=s[0].substring(0,c).trim(),s[3]=""}e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],r=t[3]):r="":r=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(s,{href:o.escapes(i),title:o.escapes(r)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),l+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length), +l+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),l+=this.renderer.codespan(d(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),l+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),l+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),i="@"===s[2]?"mailto:"+(n=d(this.mangle(s[1]))):n=d(s[1]),l+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?l+=this.renderer.text(s[0]):l+=this.renderer.text(d(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])i="mailto:"+(n=d(s[0]));else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=d(s[0]),i="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),l+=this.renderer.link(i,null,n)}return l}, +o.escapes=function(e){return e?e.replace(o.rules._escapes,"$1"):e},o.prototype.outputLink=function(e,t){var n=t.href,i=t.title?d(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,d(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,i);null!=o&&o!==e&&(n=!0,e=o)}return i?'
'+(n?e:d(e,!0))+"
\n":"
"+(n?e:d(e,!0))+"
"},r.prototype.blockquote=function(e){ +return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,i){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}, +r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"},r.prototype.image=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">"},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},a.parse=function(e,t){return new a(t).parse(e)},a.prototype.parse=function(e){ +this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,v({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},d.escapeTest=/[&<>"']/,d.escapeReplace=/[&<>"']/g,d.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},d.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,d.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var f={},g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(){}function v(e){for(var t,n,i=1;i=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+d(e.message+"",!0)+"
    ";throw e}}m.exec=m,b.options=b.setOptions=function(e){return v(b.defaults,e),b},b.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},b.defaults=b.getDefaults(),b.Parser=a,b.parser=a.parse,b.Renderer=r,b.TextRenderer=s,b.Lexer=n,b.lexer=n.lex,b.InlineLexer=o,b.inlineLexer=o.output,b.Slugger=l,b.parse=b,u=b}.call(this),define("vs/base/common/marked/marked",(function(){return u})),define(n[128],i([0,1]),(function(e,t){"use strict" +;Object.defineProperty(t,"__esModule",{value:!0}),t.clamp=function(e,t,n){return Math.min(Math.max(e,t),n)}})),define(n[16],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,i=!1,o=!1,r=!1,s=!1,a=!1,l=void 0,u="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||u){if("object"==typeof process){n="win32"===process.platform,i="darwin"===process.platform,o="linux"===process.platform,"en","en";var d=process.env.VSCODE_NLS_CONFIG;if(d)try{var c=JSON.parse(d),h=c.availableLanguages["*"];c.locale,h||"en",c._translationsConfigFile}catch(e){}r=!0}}else n=(l=navigator.userAgent).indexOf("Windows")>=0,i=l.indexOf("Macintosh")>=0,a=l.indexOf("Macintosh")>=0&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,o=l.indexOf("Linux")>=0,s=!0,navigator.language;t.isWindows=n,t.isMacintosh=i,t.isLinux=o,t.isNative=r,t.isWeb=s,t.isIOS=a +;var p="object"==typeof self?self:"object"==typeof global?global:{};t.globals=p,t.setImmediate=function(){if(t.globals.setImmediate)return t.globals.setImmediate.bind(t.globals);if("function"==typeof t.globals.postMessage&&!t.globals.importScripts){var e=[];t.globals.addEventListener("message",(function(t){if(t.data&&t.data.vscodeSetImmediateId)for(var n=0,i=e.length;n=12&&t<=16)return!1}return!0}()},keyboard:i.isNative||n.isStandalone?0:navigator.keyboard||n.isSafari?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}})),define(n[56],i([0,1,25,35,16]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new Array(230),s=new Array(112);!function(){for(var e=0;e=i&&e<=s||e>=o&&e<=a}function m(e,t,n,i){for(var o,r="",s=0,a=-1,d=0,c=0;c<=e.length;++c){if(c2){var h=r.lastIndexOf(n);-1===h?(r="",s=0):s=(r=r.slice(0,h)).length-1-r.lastIndexOf(n),a=c,d=0;continue}if(2===r.length||1===r.length){r="",s=0,a=c,d=0;continue}}t&&(r.length>0?r+=n+"..":r="..",s=2)}else r.length>0?r+=n+e.slice(a+1,c):r=e.slice(a+1,c),s=c-a-1;a=c,d=0}else o===l&&-1!==d?++d:d=-1}return r}function v(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}t.win32={resolve:function(){for(var e=[],t=0;t=-1;s--){var a=void 0 +;if(s>=0?a=e[s]:i?void 0!==(a=n.env["="+i]||n.cwd())&&a.slice(0,3).toLowerCase()===i.toLowerCase()+"\\"||(a=i+"\\"):a=n.cwd(),h(a,"path"),0!==a.length){var l=a.length,u=0,d="",c=!1,f=a.charCodeAt(0);if(l>1)if(p(f))if(c=!0,p(a.charCodeAt(1))){for(var v=2,_=v;v2&&p(a.charCodeAt(2))&&(c=!0,u=3));else p(f)&&(u=1,c=!0);if(!(d.length>0&&i.length>0&&d.toLowerCase()!==i.toLowerCase())&&(0===i.length&&d.length>0&&(i=d),r||(o=a.slice(u)+"\\"+o,r=c),i.length>0&&r))break}}return i+(r?"\\":"")+(o=m(o,!r,"\\",p))||"."},normalize:function(e){h(e,"path");var t=e.length;if(0===t)return".";var n,i,o=0,r=!1,s=e.charCodeAt(0);if(t>1)if(p(s))if(r=!0,p(e.charCodeAt(1))){for(var a=2,l=a;a2&&p(e.charCodeAt(2))&&(r=!0,o=3));else if(p(s))return"\\";return 0!==(i=o0&&p(e.charCodeAt(t-1))&&(i+="\\"),void 0===n?r?i.length>0?"\\"+i:"\\":i.length>0?i:"":r?i.length>0?n+"\\"+i:n+"\\":i.length>0?n+i:n},isAbsolute:function(e){h(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return!!p(n)||!!(g(n)&&t>2&&58===e.charCodeAt(1)&&p(e.charCodeAt(2)))},join:function(){for(var e,n,i=[],o=0;o0&&(void 0===e?e=n=s:e+="\\"+s)}if(void 0===e)return".";var a=!0,l=0;if("string"==typeof n&&p(n.charCodeAt(0))){++l;var u=n.length;u>1&&p(n.charCodeAt(1))&&(++l, +u>2&&(p(n.charCodeAt(2))?++l:a=!1))}if(a){for(;l=2&&(e="\\"+e.slice(l))}return t.win32.normalize(e)},relative:function(e,n){if(h(e,"from"),h(n,"to"),e===n)return"";var i=t.win32.resolve(e),o=t.win32.resolve(n);if(i===o)return"";if((e=i.toLowerCase())===(n=o.toLowerCase()))return"";for(var r=0;rr&&e.charCodeAt(s-1)===d;--s);for(var a=s-r,l=0;ll&&n.charCodeAt(u-1)===d;--u);for(var c=u-l,p=ap){if(n.charCodeAt(l+g)===d)return o.slice(l+g+1);if(2===g)return o.slice(l+g)}a>p&&(e.charCodeAt(r+g)===d?f=g:2===g&&(f=3));break}var m=e.charCodeAt(r+g);if(m!==n.charCodeAt(l+g))break;m===d&&(f=g)}if(g!==p&&-1===f)return o;var v="";for(-1===f&&(f=0),g=r+f+1;g<=s;++g)g!==s&&e.charCodeAt(g)!==d||(0===v.length?v+="..":v+="\\..");return v.length>0?v+o.slice(l+f,u):(l+=f,o.charCodeAt(l)===d&&++l,o.slice(l,u))}, +toNamespacedPath:function(e){if("string"!=typeof e)return e;if(0===e.length)return"";var n=t.win32.resolve(e);if(n.length>=3)if(n.charCodeAt(0)===d){if(n.charCodeAt(1)===d){var i=n.charCodeAt(2);if(63!==i&&i!==l)return"\\\\?\\UNC\\"+n.slice(2)}}else if(g(n.charCodeAt(0))&&58===n.charCodeAt(1)&&n.charCodeAt(2)===d)return"\\\\?\\"+n;return e},dirname:function(e){h(e,"path");var t=e.length;if(0===t)return".";var n=-1,i=-1,o=!0,r=0,s=e.charCodeAt(0);if(t>1)if(p(s)){if(n=r=1,p(e.charCodeAt(1))){for(var a=2,l=a;a2&&p(e.charCodeAt(2))&&(n=r=3));else if(p(s))return e;for(var u=t-1;u>=r;--u)if(p(e.charCodeAt(u))){if(!o){i=u;break}}else o=!1;if(-1===i){if(-1===n)return".";i=n}return e.slice(0,i)},basename:function(e,t){void 0!==t&&h(t,"ext"),h(e,"path");var n,i=0,o=-1,r=!0 +;e.length>=2&&(g(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(i=2));if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){var l=e.charCodeAt(n);if(p(l)){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){h(e,"path");var t=0,n=-1,i=0,o=-1,r=!0,s=0;e.length>=2&&58===e.charCodeAt(1)&&g(e.charCodeAt(0))&&(t=i=2);for(var a=e.length-1;a>=t;--a){var u=e.charCodeAt(a);if(p(u)){if(!r){i=a+1;break}}else-1===o&&(r=!1,o=a+1),u===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new c("pathObject","Object",e);return v("\\",e)},parse:function(e){h(e,"path");var t={root:"",dir:"",base:"", +ext:"",name:""};if(0===e.length)return t;var n=e.length,i=0,o=e.charCodeAt(0);if(n>1){if(p(o)){if(i=1,p(e.charCodeAt(1))){for(var r=2,s=r;r2))return t.root=t.dir=e,t;if(p(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;i=3}}}else if(p(o))return t.root=t.dir=e,t;i>0&&(t.root=e.slice(0,i));for(var a=-1,u=i,d=-1,c=!0,f=e.length-1,m=0;f>=i;--f)if(p(o=e.charCodeAt(f))){if(!c){u=f+1;break}}else-1===d&&(c=!1,d=f+1),o===l?-1===a?a=f:1!==m&&(m=1):-1!==a&&(m=-1);return-1===a||-1===d||0===m||1===m&&a===d-1&&a===u+1?-1!==d&&(t.base=t.name=e.slice(u,d)):(t.name=e.slice(u,a),t.base=e.slice(u,d),t.ext=e.slice(a,d)),t.dir=u>0&&u!==i?e.slice(0,u-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve:function(){for(var e=[],t=0;t=-1&&!o;r--){var s=void 0;h(s=r>=0?e[r]:n.cwd(),"path"),0!==s.length&&(i=s+"/"+i,o=s.charCodeAt(0)===u)}return i=m(i,!o,"/",f),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(h(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===u,n=e.charCodeAt(e.length-1)===u;return 0!==(e=m(e,!t,"/",f)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return h(e,"path"),e.length>0&&e.charCodeAt(0)===u},join:function(){for(var e,n=[],i=0;i0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":t.posix.normalize(e)},relative:function(e,n){if(h(e,"from"),h(n,"to"),e===n)return"";if((e=t.posix.resolve(e))===(n=t.posix.resolve(n)))return"";for(var i=1;il){if(n.charCodeAt(s+c)===u)return n.slice(s+c+1);if(0===c)return n.slice(s+c)}else r>l&&(e.charCodeAt(i+c)===u?d=c:0===c&&(d=0));break}var p=e.charCodeAt(i+c);if(p!==n.charCodeAt(s+c))break;p===u&&(d=c)}var f="";for(c=i+d+1;c<=o;++c)c!==o&&e.charCodeAt(c)!==u||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(s+d):(s+=d,n.charCodeAt(s)===u&&++s,n.slice(s))},toNamespacedPath:function(e){return e},dirname:function(e){if(h(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===u,n=-1,i=!0,o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===u){if(!i){n=o;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&h(t,"ext"),h(e,"path");var n,i=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(l===u){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length), +e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===u){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){h(e,"path");for(var t=-1,n=0,i=-1,o=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a!==u)-1===i&&(o=!1,i=s+1),a===l?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===r||1===r&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new c("pathObject","Object",e);return v("/",e)},parse:function(e){h(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0)===u;i?(t.root="/",n=1):n=0;for(var o=-1,r=0,s=-1,a=!0,d=e.length-1,c=0;d>=n;--d){var p=e.charCodeAt(d);if(p!==u)-1===s&&(a=!1,s=d+1),p===l?-1===o?o=d:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){r=d+1;break}}return-1===o||-1===s||0===c||1===c&&o===s-1&&o===r+1?-1!==s&&(t.base=t.name=0===r&&i?e.slice(1,s):e.slice(r,s)):(0===r&&i?(t.name=e.slice(1,o), +t.base=e.slice(1,s)):(t.name=e.slice(r,o),t.base=e.slice(r,s)),t.ext=e.slice(o,s)),r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,t.posix.posix=t.win32.posix=t.posix,t.normalize="win32"===n.platform?t.win32.normalize:t.posix.normalize,t.join="win32"===n.platform?t.win32.join:t.posix.join,t.relative="win32"===n.platform?t.win32.relative:t.posix.relative,t.dirname="win32"===n.platform?t.win32.dirname:t.posix.dirname,t.basename="win32"===n.platform?t.win32.basename:t.posix.basename,t.extname="win32"===n.platform?t.win32.extname:t.posix.extname,t.sep="win32"===n.platform?t.win32.sep:t.posix.sep})),define(n[100],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function n(e){return e.end-e.start<=0}e.intersect=t, +e.isEmpty=n,e.intersects=function(e,i){return!n(t(e,i))},e.relativeComplement=function(e,t){var i=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return n(o)||i.push(o),n(r)||i.push(r),i}}(t.Range||(t.Range={}))})),define(n[244],i([0,1,100]),(function(e,t,n){"use strict";function i(e,t){for(var i=[],o=0,r=t;o=s.range.end)){if(e.end(t|=0)&&(n=t-e),n<0&&(n=0),(i|=0)<0&&(i=0),(r|=0)+i>(o|=0)&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){ +return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}();t.ScrollState=o;var s=function(e){function t(t,i){ +var r=e.call(this)||this;return r._onScroll=r._register(new n.Emitter),r.onScroll=r._onScroll.event,r._smoothScrollDuration=t,r._scheduleAtNextAnimationFrame=i,r._state=new o(0,0,0,0,0,0),r._smoothScrolling=null,r}return r(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){ +var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{n=this._state.withScrollPosition(e);this._smoothScrolling=u.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null, +t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())}))}},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(i.Disposable);t.Scrollable=s;var a=function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n};function l(e,t){var n=t-e;return function(t){return e+n*(1-function(e){return Math.pow(e,3)}(1-t))}}t.SmoothScrollingUpdate=a;var u=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()} +return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)},e.prototype._initAnimation=function(e,t,n){var i,o,r;if(Math.abs(e-t)>2.5*n){var s=void 0,a=void 0;return et?1:0}function a(e){return e>=97&&e<=122}function l(e){return e>=65&&e<=90}function u(e){return a(e)||l(e)}function d(e,t,n){void 0===n&&(n=e.length);for(var i=0;i1){var i=e.charCodeAt(t-2);if(c(i))return n-56320+(i-55296<<10)+65536}return n}function g(e,t){var n=b.getInstance(),i=e.length,o=t,r=p(e,i,t),s=n.getGraphemeBreakType(r);t+=r>=65536?2:1;for(var a=s;t=65536?2:1,a=u}var d=t;for(t=o,a=s;t>0;){var c=f(e,t),h=n.getGraphemeBreakType(c);if(C(h,a))break;t-=c>=65536?2:1,a=h}return[t,d]}t.format=function(e){for(var t=[],i=1;i=t.length?e:t[i]}))},t.escape=function(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))},t.escapeRegExpCharacters=i,t.trim=function(e,t){return void 0===t&&(t=" "),r(o(e,t),t)},t.ltrim=o,t.rtrim=r, +t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=i(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var o="";return n.global&&(o+="g"),n.matchCase||(o+="i"),n.multiline&&(o+="m"),n.unicode&&(o+="u"),new RegExp(e,o)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){ +for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:0},t.isLowerAsciiLetter=a,t.isUpperAsciiLetter=l,t.equalsIgnoreCase=function(e,t){return e.length===t.length&&d(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&d(e,t,n)},t.commonPrefixLength=function(e,t){var n,i=Math.min(e.length,t.length) +;for(n=0;n=65536?2:1;for(var s=n.getGraphemeBreakType(r);t=65536?2:1,s=l}return t-i},t.prevCharLength=function(e,t){var n=b.getInstance(),i=t,o=f(e,t);t-=o>=65536?2:1;for(var r=n.getGraphemeBreakType(o);t>0;){var s=f(e,t),a=n.getGraphemeBreakType(s);if(C(a,r))break;t-=s>=65536?2:1,r=a}return i-t},t.getCharContainingOffset=function(e,t){return t>0&&h(e.charCodeAt(t))?g(e,t-1):g(e,t)} +;var m=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return m.test(e)};var v=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;t.containsEmoji=function(e){return v.test(e)};var _=/^[\t\n\r\x20-\x7E]*$/;function y(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function C(e,t){ +return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}t.isBasicASCII=function(e){return _.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=function(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",i=0;it[3*i+1]))return t[3*i+2];i=2*i+1}return 0},e._INSTANCE=null,e}()})),define(n[177],i([0,1,5,76]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSlashes=function(e){return e.replace(/[\\/]/g,i.posix.sep)},t.isEqualOrParent=function(e,t,o,r){if(void 0===r&&(r=i.sep),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(o){if(!n.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;var s=t.length;return t.charAt(t.length-1)===r&&s--,e.charAt(s)===r}return t.charAt(t.length-1)!==r&&(t+=r),0===e.indexOf(t)},t.isWindowsDriveLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122}})),define(n[61],i([0,1,41,5]),(function(e,t,n,i){"use strict";function o(){ +for(var e=[],t=0;t0?[{start:0,end:t.length}]:[]}.bind(void 0,!0),t.matchesContiguousSubString=r,t.matchesSubString=s,t.isUpper=l;var c=new Set;function h(e){return a(e)||l(e)||u(e)} +function p(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function f(e,t){for(var n=t;n0&&!h(e.charCodeAt(n-1)))return n}return e.length}function g(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;for(o=g(e,t,n+1,i+1);!o&&(r=f(t,r))60)return null;var n=function(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s.2&&t<.8&&i>.6&&o<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var i=null,o=0;for(e=e.toLowerCase();o/?".split("").forEach((function(e){return c.add(e.charCodeAt(0))})),t.matchesCamelCase=m;var v=o(t.matchesPrefix,m,r),_=o(t.matchesPrefix,m,s),y=new n.LRUCache(1e4);t.matchesFuzzy=function(e,t,n){if(void 0===n&&(n=!1),"string"!=typeof e||"string"!=typeof t)return null;var o=y.get(e);o||(o=new RegExp(i.convertSimple2RegExpPattern(e),"i"),y.set(e,o));var r=o.exec(t);return r?[{start:r.index,end:r.index+r[0].length}]:n?_(e,t):v(e,t)},t.anyScore=function(e,t,n,i,o,r){var s=M(e,t,0,i,o,0,!0);if(s)return s;for(var a=0,l=0,u=r,d=0;d=0)l+=1,a+=Math.pow(2,c),u=c+1;else if(0!==a)break}return[l,a,r]},t.createMatches=function(e){ +if(void 0===e)return[];for(var t=e[1].toString(2),n=[],i=e[2];i=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function x(e,t,n){return t[e]!==n[e]}function I(e,t,n,i,o,r){for(;tC?C:e.length,l=i.length>C?C:i.length +;if(!(n>=a||r>=l||a-n>l-r)&&I(t,n,a,o,r,l)){var u=1,d=1,c=n,h=r;for(u=1,c=n;c1?1:p),g=S[u-1][d]+-1,m=S[u][d-1]+-1;m>=g?m>f?(S[u][d]=m,E[u][d]=4):m===f?(S[u][d]=m,E[u][d]=6):(S[u][d]=f,E[u][d]=2):g>f?(S[u][d]=g,E[u][d]=1):g===f?(S[u][d]=g,E[u][d]=3):(S[u][d]=f,E[u][d]=2)}if(L&&function(e,t,n,i){e=e.substr(t),n=n.substr(i),console.log(D(S,e,e.length,n,n.length)),console.log(D(E,e,e.length,n,n.length)),console.log(D(w,e,e.length,n,n.length))}(e,n,i,r),T=0,O=-100,P=r,A=s,function e(t,n,i,o,r){if(T>=10||i<-25)return;var s=0;for(;t>0&&n>0;){var a=w[t][n],l=E[t][n];if(4===l)n-=1,r?i-=5:0!==o&&(i-=1),r=!1,s=0;else{if(!(2&l))return;if(4&l&&e(t,n-1,0!==o?i-1:i,o,r),i+=a,t-=1,n-=1,r=!0,o+=Math.pow(2,n+P),1===a){if(s+=1,0===t&&!A)return}else i+=1+s*(a-1),s=0}}i-=n>=3?9:3*n;T+=1;i>O&&(O=i,R=o)}(u-1,d-1,a===l?1:0,0,!1),0!==T)return[O,R,r]}}function k(e,t,n,i,o,r,s){ +return t[n]!==r[s]?-1:s===n-i?e[n]===o[s]?7:5:!x(s,o,r)||0!==s&&x(s-1,o,r)?!N(r,s)||0!==s&&N(r,s-1)?N(r,s-1)||function(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}(r,s-1)?5:1:5:e[n]===o[s]?7:5}t.isPatternInWord=I,function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(t.FuzzyScore||(t.FuzzyScore={})),t.fuzzyScore=M;var T=0,R=0,O=0,P=0,A=!1;function F(e,t){if(!(t+1>=e.length)){var n=e[t],i=e[t+1];if(n!==i)return e.slice(0,t)+i+n+e.slice(t+2)}}t.fuzzyScoreGracefulAggressive=function(e,t,n,i,o,r,s){return function(e,t,n,i,o,r,s,a){var l=M(e,t,n,i,o,r,a);if(l&&!s)return l;if(e.length>=3)for(var u=Math.min(7,e.length-1),d=n+1;dl[0])&&(l=h))}}return l}(e,t,n,i,o,r,!0,s)}})),define(n[178],i([0,1,19,5,177,76,41,15]),(function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) +;var l="**",u="/",d="[/\\\\]",c="[^/\\\\]",h=/\//g;function p(e){switch(e){case 0:return"";case 1:return c+"*?";default:return"(?:"+d+"|"+c+"+"+d+"|"+d+c+"+)*?"}}function f(e,t){if(!e)return[];for(var n=[],i=!1,o=!1,r="",s=0,a=e;s0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var l=e.filter((function(e){return!e.basenames}));return l.push(a),l}t.match=function(e,t,n){return!(!e||"string"!=typeof t)&&x(e)(t,void 0,n)},t.parse=x,t.isRelativePattern=I})),define(n[245],i([0,1,5]),(function(e,t,n){"use strict";function i(e,t){if(e&&""!==e[0]){var i=o(e,t,"-"),s=o(e,t,"_");return i&&!s?r(e,t,"-"):!i&&s?r(e,t,"_"):e[0].toUpperCase()===e[0]?t.toUpperCase():e[0].toLowerCase()===e[0]?t.toLowerCase():n.containsUppercaseCharacter(e[0][0])?t[0].toUpperCase()+t.substr(1):t}return t}function o(e,t,n){return-1!==e[0].indexOf(n)&&-1!==t.indexOf(n)&&e[0].split(n).length===t.split(n).length}function r(e,t,n){var o=t.split(n),r=e[0].split(n),s="";return o.forEach((function(e,t){s+=i([r[t]],e)+n})),s.slice(0,-1)} +Object.defineProperty(t,"__esModule",{value:!0}),t.buildReplaceStringWithCasePreserved=i})),define(n[22],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function i(e){return typeof e===n.string||e instanceof String}function o(e){return!(typeof e!==n.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function r(e){return typeof e===n.undefined}function s(e){return r(e)||null===e}t.isArray=function(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==n.number||e.constructor!==Array)},t.isString=i,t.isObject=o,t.isNumber=function(e){return(typeof e===n.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=r,t.isUndefinedOrNull=s,t.assertType=function(e,t){if(!e)throw new Error(t?"Unexpected type, expected '"+t+"'":"Unexpected type")};var a=Object.prototype.hasOwnProperty;function l(e){ +return typeof e===n.function}function u(e,t){if(i(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(l(t)){try{if(e instanceof t)return}catch(e){}if(!s(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function d(e){for(var t=[],n=Object.getPrototypeOf(e);Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}t.isEmptyObject=function(e){if(!o(e))return!1;for(var t in e)if(a.call(e,t))return!1;return!0},t.isFunction=l,t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i0;){var n=t.shift();for(var o in Object.freeze(n),n)if(i.call(n,o)){var r=n[o];"object"!=typeof r||Object.isFrozen(r)||t.push(r)}}return e};var i=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return function e(t,o,r){if(n.isUndefinedOrNull(t))return t;var s=o(t);if(void 0!==s)return s;if(n.isArray(t)){ +for(var a=[],l=0,u=t;l4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0}),t.toUint8=function(e){return e<0?0:e>255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,i=new Uint32Array(t),o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=f[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function m(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function _(e,t){var n=t?m:g,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,l=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=u,i+=u),r){var d=r.indexOf("@");if(-1!==d){var c=r.substr(0,d);r=r.substr(d+1),-1===(d=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,d),!1),i+=":",i+=n(c.substr(d+1),!1)),i+="@"}-1===(d=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,d),!1),i+=r.substr(d))}if(s){ +if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:g(l,!1)),i}var y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(y)?e.replace(y,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}})),define(n[179],i([0,1,24]),(function(e,t,n){"use strict";function i(e,t){if(void 0===t&&(t=0),!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return n.URI.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var o in e)Object.hasOwnProperty.call(e,o)&&(e[o]=i(e[o],t+1))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e){var t=JSON.parse(e);return t=i(t)},t.revive=i})),define(n[45],i([0,1,24,16]),(function(e,t,n,i){ +"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata"}(o=t.Schemas||(t.Schemas={}));var r=function(){function e(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}return e.prototype.setPreferredWebSchema=function(e){this._preferredWebSchema=e},e.prototype.rewrite=function(e){if(this._delegate)return this._delegate(e);var t=e.authority,r=this._hosts[t];r&&-1!==r.indexOf(":")&&(r="["+r+"]");var s=this._ports[t],a=this._connectionTokens[t],l="path="+encodeURIComponent(e.path) +;return"string"==typeof a&&(l+="&tkn="+encodeURIComponent(a)),n.URI.from({scheme:i.isWeb?this._preferredWebSchema:o.vscodeRemoteResource,authority:r+":"+s,path:"/vscode-remote-resource",query:l})},e}();t.RemoteAuthorities=new r}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;)D.sort(M.sort),D.shift().execute();x=!1},t.scheduleAtNextAnimationFrame=function(e,t){void 0===t&&(t=0);var n,i=new M(e,t);return L.push(i),N||(N=!0,n=I,E||(E=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout((function(){return e((new Date).getTime())}),0)}),E.call(self,n)),i},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,n){if(x){var i=new M(e,n);return D.push(i),i}return t.scheduleAtNextAnimationFrame(e,n)};var k=16,T=function(e,t){return t},R=function(e){function t(t,n,i,o,r){ +void 0===o&&(o=T),void 0===r&&(r=k);var s=e.call(this)||this,a=null,l=0,d=s._register(new u.TimeoutTimer),c=function(){l=(new Date).getTime(),i(a),a=null};return s._register(b(t,n,(function(e){a=o(a,e);var t=(new Date).getTime()-l;t>=r?(d.cancel(),c()):d.setIfNotSet(c,r-t)}))),s}return r(t,e),t}(h.Disposable);function O(e){return document.defaultView.getComputedStyle(e,null)}t.addDisposableThrottledListener=function(e,t,n,i,o){return new R(e,t,n,i,o)},t.getComputedStyle=O;var P=function(){function e(){}return e.convertToPixels=function(e,t){return parseFloat(t)||0},e.getDimension=function(t,n,i){var o=O(t),r="0";return o&&(r=o.getPropertyValue?o.getPropertyValue(n):o.getAttribute(i)),e.convertToPixels(t,r)},e.getBorderLeftWidth=function(t){return e.getDimension(t,"border-left-width","borderLeftWidth")},e.getBorderRightWidth=function(t){return e.getDimension(t,"border-right-width","borderRightWidth")},e.getBorderTopWidth=function(t){return e.getDimension(t,"border-top-width","borderTopWidth")}, +e.getBorderBottomWidth=function(t){return e.getDimension(t,"border-bottom-width","borderBottomWidth")},e.getPaddingLeft=function(t){return e.getDimension(t,"padding-left","paddingLeft")},e.getPaddingRight=function(t){return e.getDimension(t,"padding-right","paddingRight")},e.getPaddingTop=function(t){return e.getDimension(t,"padding-top","paddingTop")},e.getPaddingBottom=function(t){return e.getDimension(t,"padding-bottom","paddingBottom")},e.getMarginLeft=function(t){return e.getDimension(t,"margin-left","marginLeft")},e.getMarginTop=function(t){return e.getDimension(t,"margin-top","marginTop")},e.getMarginRight=function(t){return e.getDimension(t,"margin-right","marginRight")},e.getMarginBottom=function(t){return e.getDimension(t,"margin-bottom","marginBottom")},e}(),A=function(e,t){this.width=e,this.height=t};function F(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function W(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style") +;return t.type="text/css",t.media="screen",e.appendChild(t),t}t.Dimension=A,t.getTopLeftOffset=function(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=O(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=P.getBorderLeftWidth(e),n+=P.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}},t.getDomNodePagePosition=function(e){var n=e.getBoundingClientRect();return{left:n.left+t.StandardWindow.scrollX,top:n.top+t.StandardWindow.scrollY,width:n.width,height:n.height}},t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){ +return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getTotalWidth=function(e){var t=P.getMarginLeft(e)+P.getMarginRight(e);return e.offsetWidth+t},t.getContentWidth=function(e){var t=P.getBorderLeftWidth(e)+P.getBorderRightWidth(e),n=P.getPaddingLeft(e)+P.getPaddingRight(e);return e.offsetWidth-t-n},t.getContentHeight=function(e){var t=P.getBorderTopWidth(e)+P.getBorderBottomWidth(e),n=P.getPaddingTop(e)+P.getPaddingBottom(e);return e.offsetHeight-t-n},t.getTotalHeight=function(e){var t=P.getMarginTop(e)+P.getMarginBottom(e);return e.offsetHeight+t},t.isAncestor=F,t.findParentWithClass=function(e,n,i){for(;e;){if(t.hasClass(e,n))return e;if(i)if("string"==typeof i){if(t.hasClass(e,i))return null}else if(e===i)return null;e=e.parentNode}return null},t.createStyleSheet=W;var V=null;function B(){return V||(V=W()),V}t.createCSSRule=function(e,t,n){void 0===n&&(n=B()),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}, +t.removeCSSRulesContainingSelector=function(e,t){if(void 0===t&&(t=B()),t){for(var n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[],o=0;o=0;o--)t.sheet.deleteRule(i[o])}},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange", +WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:n.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode};var z=function(e){function n(n){var o=e.call(this)||this +;o._onDidFocus=o._register(new c.Emitter),o.onDidFocus=o._onDidFocus.event,o._onDidBlur=o._register(new c.Emitter),o.onDidBlur=o._onDidBlur.event;var r=F(document.activeElement,n),s=!1,a=function(){s=!1,r||(r=!0,o._onDidFocus.fire())},l=function(){r&&(s=!0,window.setTimeout((function(){s&&(s=!1,r=!1,o._onDidBlur.fire())}),0))};return o._refreshStateHandler=function(){F(document.activeElement,n)!==r&&(r?l():a())},o._register(i.domEvent(n,t.EventType.FOCUS,!0)(a)),o._register(i.domEvent(n,t.EventType.BLUR,!0)(l)),o}return r(n,e),n}(h.Disposable);t.trackFocus=function(e){return new z(e)},t.append=function(e){for(var t=[],n=1;n=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function r(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}})),define(n[77],i([0,1,8,16,174,44,2,87]),(function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardMouseMoveMerger=function(e,t){var n=new r.StandardMouseEvent(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}};var l=function(){function e(){this.hooks=new s.DisposableStore,this.mouseMoveEventMerger=null,this.mouseMoveCallback=null,this.onStopCallback=null} +return e.prototype.dispose=function(){this.stopMonitoring(!1),this.hooks.dispose()},e.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks.clear(),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t&&t()}},e.prototype.isMonitoring=function(){return!!this.mouseMoveEventMerger},e.prototype.startMonitoring=function(e,t,s){var l=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=s;for(var u=o.IframeUtils.getSameOriginWindowChain(),d=i.isIOS&&a.BrowserFeatures.pointerEvents?"pointermove":"mousemove",c=i.isIOS&&a.BrowserFeatures.pointerEvents?"pointerup":"mouseup",h=0,p=u;h"},y.link=function(t,n,i){return t===i&&(i=r.removeMarkdownEscapes(i)),t=v(t,!1),n=r.removeMarkdownEscapes(n),!(t=r.removeMarkdownEscapes(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?i:'
    /g,">").replace(/"/g,""").replace(/'/g,"'"))+'" title="'+(n||t)+'">'+i+""},y.paragraph=function(e){return"

    "+e+"

    "}, +t.codeBlockRenderer&&(y.code=function(e,n){var i=t.codeBlockRenderer(n,e),o=s.defaultGenerator.nextId(),r=Promise.all([i,_]).then((function(e){var t=e[0],n=g.querySelector('div[data-code="'+o+'"]');n&&(n.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&r.then(t.codeBlockRenderCallback),'
    '+c.escape(e)+"
    "});var C=t.actionHandler;C&&C.disposeables.add(n.addStandardDisposableListener(g,"click",(function(e){var t=e.target;if("A"===t.tagName||(t=t.parentElement)&&"A"===t.tagName)try{var n=t.dataset.href;n&&C.callback(n,e)}catch(e){o.onUnexpectedError(e)}finally{e.preventDefault()}})));var b={sanitize:!0,renderer:y},S=[p.Schemas.http,p.Schemas.https,p.Schemas.mailto,p.Schemas.data,p.Schemas.file,p.Schemas.vscodeRemote,p.Schemas.vscodeRemoteResource];e.isTrusted&&S.push(p.Schemas.command);var w=a.parse(e.value,b);return g.innerHTML=l.insane(w,{allowedSchemes:S,allowedAttributes:{a:["href","name","target","data-href"], +iframe:["allowfullscreen","frameborder","src"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class"]}}),f(),g}}));var h=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};define(n[57],i([0,1,19,2,8,98]),(function(e,t,n,i,o,s){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(a=t.EventType||(t.EventType={}));var l=function(e){function t(){var t=e.call(this)||this;return t.dispatched=!1,t.activeTouches={},t.handle=null,t.targets=[],t.ignoreTargets=[],t._lastSetTapCountTime=0, +t._register(o.addDisposableListener(document,"touchstart",(function(e){return t.onTouchStart(e)}))),t._register(o.addDisposableListener(document,"touchend",(function(e){return t.onTouchEnd(e)}))),t._register(o.addDisposableListener(document,"touchmove",(function(e){return t.onTouchMove(e)}))),t}return r(t,e),t.addTarget=function(e){return t.isTouchDevice()?(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.targets.push(e),{dispose:function(){t.INSTANCE.targets=t.INSTANCE.targets.filter((function(t){return t!==e}))}}):i.Disposable.None},t.ignoreTarget=function(e){return t.isTouchDevice()?(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.ignoreTargets.push(e),{dispose:function(){t.INSTANCE.ignoreTargets=t.INSTANCE.ignoreTargets.filter((function(t){return t!==e}))}}):i.Disposable.None},t.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},t.prototype.dispose=function(){this.handle&&(this.handle.dispose(),this.handle=null),e.prototype.dispose.call(this)}, +t.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=t.HOLD_DELAY&&Math.abs(d.initialPageX-n.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-n.tail(d.rollingPageY))<30){var h;(h=s.newGestureEvent(a.Contextmenu,d.initialTarget)).pageX=n.tail(d.rollingPageX),h.pageY=n.tail(d.rollingPageY),s.dispatchEvent(h)}else if(1===o){var p=n.tail(d.rollingPageX),f=n.tail(d.rollingPageY),g=n.tail(d.rollingTimestamps)-d.rollingTimestamps[0],m=p-d.rollingPageX[0],v=f-d.rollingPageY[0],_=s.targets.filter((function(e){return d.initialTarget instanceof Node&&e.contains(d.initialTarget)}));s.inertia(_,i,Math.abs(m)/g,m>0?1:-1,p,Math.abs(v)/g,v>0?1:-1,f)}s.dispatchEvent(s.newGestureEvent(a.End,d.initialTarget)),delete s.activeTouches[u.identifier]},s=this,l=0,u=e.changedTouches.length;lt.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=i,e.tapCount=o}else e.type!==a.Change&&e.type!==a.Contextmenu||(this._lastSetTapCountTime=0);for(var r=0;r0&&(g=!1,p=r*i*h),l>0&&(g=!1,f=u*l*h) +;var m=c.newGestureEvent(a.Change);m.translationX=p,m.translationY=f,e.forEach((function(e){return e.dispatchEvent(m)})),g||c.inertia(e,o,i,r,s+p,l,u,d+f)}))},t.prototype.onTouchMove=function(e){for(var t=Date.now(),i=0,o=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",r)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.SCROLL_FRICTION=-.005,t.HOLD_DELAY=700,t.CLEAR_TAP_COUNT_TIME=400,h([s.memoize],t,"isTouchDevice",null),t}(i.Disposable) +;t.Gesture=l})),define(n[247],i([0,1,8]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.renderers=e,this.cache=new Map}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var i=n.$(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.getRenderer(e).renderTemplate(i)}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,i=e.templateId;t&&(n.removeClass(t,"scrolling"),function(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(e){}}(t)),this.getTemplateCache(i).push(e)},e.prototype.getTemplateCache=function(e){var t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t},e.prototype.dispose=function(){var e=this;this.cache.forEach((function(t,n){for(var i=0,o=t;i140)n._setDesiredScrollPositionNow(s.getScrollPosition());else{var a=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))}}),(function(){ +n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.Widget);t.AbstractScrollbar=d})),define(n[248],i([0,1,44,180,132,175]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,i,r){var a=e.call(this,{lazyRender:i.lazyRender,host:r,scrollbarState:new s.ScrollbarState(i.horizontalHasArrows?i.arrowSize:0,2===i.horizontal?0:i.horizontalScrollbarSize,2===i.vertical?0:i.verticalScrollbarSize),visibility:i.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(i.horizontalHasArrows){var l=(i.arrowSize-o.ARROW_IMG_SIZE)/2,u=(i.horizontalScrollbarSize-o.ARROW_IMG_SIZE)/2;a._createArrow({className:"left-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:i.arrowSize,bgHeight:i.horizontalScrollbarSize,onActivate:function(){ +return a._host.onMouseWheel(new n.StandardWheelEvent(null,1,0))}}),a._createArrow({className:"right-arrow",top:u,left:void 0,bottom:void 0,right:l,bgWidth:i.arrowSize,bgHeight:i.horizontalScrollbarSize,onActivate:function(){return a._host.onMouseWheel(new n.StandardWheelEvent(null,-1,0))}})}return a._createSlider(Math.floor((i.horizontalScrollbarSize-i.horizontalSliderSize)/2),0,void 0,i.horizontalSliderSize),a}return r(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e}, +t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(i.AbstractScrollbar);t.HorizontalScrollbar=a})),define(n[249],i([0,1,44,180,132,175]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,i,r){var a=e.call(this,{lazyRender:i.lazyRender,host:r,scrollbarState:new s.ScrollbarState(i.verticalHasArrows?i.arrowSize:0,2===i.vertical?0:i.verticalScrollbarSize,0),visibility:i.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(i.verticalHasArrows){var l=(i.arrowSize-o.ARROW_IMG_SIZE)/2,u=(i.verticalScrollbarSize-o.ARROW_IMG_SIZE)/2;a._createArrow({className:"up-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:function(){return a._host.onMouseWheel(new n.StandardWheelEvent(null,0,1))}}),a._createArrow({className:"down-arrow",top:void 0, +left:u,bottom:l,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:function(){return a._host.onMouseWheel(new n.StandardWheelEvent(null,0,-1))}})}return a._createSlider(0,Math.floor((i.verticalScrollbarSize-i.verticalSliderSize)/2),i.verticalSliderSize,void 0),a}return r(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx}, +t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(i.AbstractScrollbar);t.VerticalScrollbar=a}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t1&&e.scheme===s.Schemas.file?"//"+e.authority+i:l.isWindows&&47===i.charCodeAt(0)&&n.isWindowsDriveLetter(i.charCodeAt(1))&&58===i.charCodeAt(2)?i.substr(1):i,l.isWindows&&(t=t.replace(/\//g,"\\")),t}Object.defineProperty(t,"__esModule",{value:!0}),t.hasToIgnoreCase=u,t.basenameOrAuthority=function(e){return c(e)||e.authority},t.isEqualAuthority=d,t.isEqual=function(e,t,n){if(void 0===n&&(n=u(e)), +e===t)return!0;if(!e||!t)return!1;if(e.scheme!==t.scheme||!d(e.authority,t.authority))return!1;var i=e.path||"/",o=t.path||"/";return i===o||n&&r.equalsIgnoreCase(i||"/",o||"/")},t.basename=c,t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===s.Schemas.file)return o.URI.file(i.dirname(h(e)));var t=i.posix.dirname(e.path);return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error('dirname("'+e.toString+")) resulted in a relative path"),t="/"),e.with({path:t})},t.joinPath=function(e){for(var t,n,r=[],l=1;l1,p=void 0;if(p=a.isEqual(d.uri,e)?"":a.relativePath(d.uri,e),h){var f=d.name?d.name:a.basename(d.uri);p=p?f+" • "+p:f}return p}}if(e.scheme!==r.Schemas.file&&e.scheme!==r.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(l(e.fsPath))return i.normalize(u(e.fsPath));var g=i.normalize(e.fsPath);return!s.isWindows&&t&&(g=c(g,t.userHome)),g},t.getBaseLabel=function(e){if(e){"string"==typeof e&&(e=n.URI.file(e));var t=a.basename(e)||(e.scheme===r.Schemas.file?e.fsPath:e.path);return l(t)?u(t):t}},t.normalizeDriveLetter=u;var d=Object.create(null);function c(e,t){if(s.isWindows||!e||!t)return e;var n=d.original===t?d.normalized:void 0;return n||(n=""+o.rtrim(t,i.posix.sep)+i.posix.sep,d={original:t,normalized:n}),(s.isLinux?o.startsWith(e,n):o.startsWithIgnoreCase(e,n))&&(e="~/"+e.substr(n.length)),e}t.tildify=c})), +define(n[250],i([0,1,76,5,178,45,37]),(function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_UNKNOWN="application/unknown";var a=[],l=[],u=[];function d(e,t,n){for(var r=null,s=null,a=null,l=n.length-1;l>=0;l--){var u=n[l];if(t===u.filenameLowercase){r=u;break}if(u.filepattern&&(!s||u.filepattern.length>s.filepattern.length)){var d=u.filepatternOnPath?e:t;o.match(u.filepatternLowercase,d)&&(s=u)}u.extension&&(!a||u.extension.length>a.extension.length)&&i.endsWith(t,u.extensionLowercase)&&(a=u)}return r?r.mime:s?s.mime:a?a.mime:null}t.registerTextMime=function(e,t){void 0===t&&(t=!1);var i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0, +filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(n.posix.sep)>=0}}(e);a.push(i),i.userConfigured?u.push(i):l.push(i),t&&!i.userConfigured&&a.forEach((function(e){e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn("Overwriting extension <<"+i.extension+">> to now point to mime <<"+i.mime+">>"),i.filename&&e.filename===i.filename&&console.warn("Overwriting filename <<"+i.filename+">> to now point to mime <<"+i.mime+">>"),i.filepattern&&e.filepattern===i.filepattern&&console.warn("Overwriting filepattern <<"+i.filepattern+">> to now point to mime <<"+i.mime+">>"),i.firstline&&e.firstline===i.firstline&&console.warn("Overwriting firstline <<"+i.firstline+">> to now point to mime <<"+i.mime+">>"))}))},t.guessMimeTypes=function(e,o){var c;if(e)switch(e.scheme){case r.Schemas.file:c=e.fsPath;break;case r.Schemas.data:c=s.DataUri.parseMetaData(e).get(s.DataUri.META_DATA_LABEL);break;default:c=e.path}if(!c)return[t.MIME_UNKNOWN];c=c.toLowerCase() +;var h=n.basename(c),p=d(c,h,u);if(p)return[p,t.MIME_TEXT];var f=d(c,h,l);if(f)return[f,t.MIME_TEXT];if(o){var g=function(e){i.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=a.length-1;t>=0;t--){var n=a[t];if(n.firstline){var o=e.match(n.firstline);if(o&&o.length>0)return n.mime}}return null}(o);if(g)return[g,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}})),define(n[181],i([0,1,10,2,16,22]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="$initialize",l=!1;t.logOnceWebWorkerWarning=function(e){o.isWeb&&(l||(l=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var u=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){ +var n=this,i=String(++this._lastSentReq);return new Promise((function(o,r){n._pendingReplies[i]={resolve:o,reject:r},n._send({vsWorker:n._workerId,req:i,method:e,args:t})}))},e.prototype.handleMessage=function(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var i=e;if(!this._pendingReplies[i.seq])return void console.warn("Got reply to unknown seq");var o=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){var r=i.err;return i.err.$isError&&((r=new Error).name=i.err.name,r.message=i.err.message,r.stack=i.err.stack),void o.reject(r)}o.resolve(i.res)}else{var s=e,a=s.req;this._handler.handleMessage(s.method,s.args).then((function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})}),(function(e){e.detail instanceof Error&&(e.detail=n.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:a,res:void 0,err:n.transformErrorForSerialization(e)})}))}}, +e.prototype._send=function(e){var t=[];if(e.req)for(var n=e,i=0;i0)},e.prototype.getChildren=function(e,t){var n=this.modelProvider.getModel();return Promise.resolve(n===t?n.entries:[])},e.prototype.getParent=function(e,t){return Promise.resolve(null)},e}();t.DataSource=i;var o=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider?n.accessibilityProvider.getAriaLabel(t):null},e.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel(),i=0 +;if(n.filter)for(var o=0,r=n.entries;o=0;t--){var n=this._arr[t];if(e.toChord().equals(n.keybinding))return n.callback}return null},e}();t.KeybindingDispatcher=s;var a=function(){function e(e){var t=this;void 0===e&&(e={clickBehavior:0,keyboardSupport:!0,openMode:0}),this.options=e,this.downKeyBindingDispatcher=new s,this.upKeyBindingDispatcher=new s, +("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(18,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(15,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(17,(function(e,n){return t.onRight(e,n)})),n.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(300,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(302,(function(e,n){return t.onUp(e,n)}))),this.downKeyBindingDispatcher.set(11,(function(e,n){return t.onPageUp(e,n)})),this.downKeyBindingDispatcher.set(12,(function(e,n){return t.onPageDown(e,n)})),this.downKeyBindingDispatcher.set(14,(function(e,n){return t.onHome(e,n)})),this.downKeyBindingDispatcher.set(13,(function(e,n){return t.onEnd(e,n)})),this.downKeyBindingDispatcher.set(10,(function(e,n){return t.onSpace(e,n)})), +this.downKeyBindingDispatcher.set(9,(function(e,n){return t.onEscape(e,n)})),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),0===this.options.clickBehavior&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(o.findParentWithClass(n.target,"scrollbar","monaco-tree"))return!1;if(o.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,i){return n.isMacintosh&&i.ctrlKey?(i.preventDefault(),i.stopPropagation(),!1):(!i.target||!i.target.tagName||"input"!==i.target.tagName.toLowerCase())&&((0!==this.options.clickBehavior||!i.leftButton&&!i.middleButton)&&this.onLeftClick(e,t,i))},e.prototype.onLeftClick=function(e,t,n,o){void 0===o&&(o="mouse");var r=n,s={origin:o,originalEvent:n, +didClickOnTwistie:this.isClickOnTwistie(r)};e.getInput()===t?(e.clearFocus(s),e.clearSelection(s)):(n&&r.browserEvent&&"mousedown"===r.browserEvent.type&&1===r.browserEvent.detail||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],s),e.setFocus(t,s),this.shouldToggleExpansion(t,r,o)&&(e.isExpanded(t)?e.collapse(t).then(void 0,i.onUnexpectedError):e.expand(t).then(void 0,i.onUnexpectedError)));return!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return 0===this.options.openMode},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!o.hasClass(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i}, +e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n), +e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).then(void 0,i.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var o=e.getFocus() +;e.collapse(o).then((function(t){if(o&&!t)return e.focusParent(n),e.reveal(e.getFocus())})).then(void 0,i.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var o=e.getFocus();e.expand(o).then((function(t){if(o&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())})).then(void 0,i.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}();t.DefaultController=a;var l=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null}, +e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}();t.DefaultDragAndDrop=l;var u=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=u;var d=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=d;var c=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"), +e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"), +e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"), +e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t") +;var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}();t.DefaultTreestyler=c})),define(n[253],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=n;var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=i;var o=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.types&&(this.types=[],Array.prototype.push.apply(this.types,e.types)),e.files&&(this.files=[],Array.prototype.push.apply(this.files,e.files),this.files=this.files.filter((function(e){return e.size||e.type})))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=o})), +define(n[254],i([0,1,121,10,2,4]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this._onDispose=new s.Emitter,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=void 0)},e}();t.LockData=a;var l=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n=this,i=this.getLock(e);return i?new Promise((function(o,r){s.Event.once(i.onDispose)((function(){return n.run(e,t).then(o,r)}))})):new Promise((function(i,o){if(e.isDisposed())return o(new Error("Item is disposed."));var r=n.locks[e.id]=new a(e);return t().then((function(t){return delete n.locks[e.id],r.dispose(),t})).then(i,o)}))},e.prototype.getLock=function(e){var t +;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}();t.Lock=l;var u=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new s.EventMultiplexer,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new s.EventMultiplexer,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new s.EventMultiplexer,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new s.EventMultiplexer,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new s.EventMultiplexer,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new s.EventMultiplexer,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new s.EventMultiplexer,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new s.EventMultiplexer,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new s.EventMultiplexer, +this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new s.EventMultiplexer,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new s.EventMultiplexer,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){n.ok(!this.isRegistered(e.id),"item already registered: "+e.id);var t=o.combinedDisposable(this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose));this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){ +n.ok(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items={},this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}();t.ItemRegistry=u;var d=function(){function e(e,t,n,i,o){this._onDidCreate=new s.Emitter,this._onDidReveal=new s.Emitter,this.onDidReveal=this._onDidReveal.event,this._onExpand=new s.Emitter,this.onExpand=this._onExpand.event,this._onDidExpand=new s.Emitter, +this.onDidExpand=this._onDidExpand.event,this._onCollapse=new s.Emitter,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new s.Emitter,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new s.Emitter,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new s.Emitter,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new s.Emitter,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new s.Emitter,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new s.Emitter,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new s.Emitter,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=n,this.lock=i,this.element=o,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={}, +this.depth=0,this.expanded=!(!this.context.dataSource.shouldAutoexpand||!this.context.dataSource.shouldAutoexpand(this.context.tree,o)),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?Promise.resolve(!1):this.lock.run(this,(function(){if(e.isExpanded()||!e.doesHaveChildren)return Promise.resolve(!1);var t={item:e} +;return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):Promise.resolve(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=Promise.resolve(null);return this.forEachChild((function(e){n=n.then((function(){return e.collapse(!0)}))})),n.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?Promise.resolve(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),Promise.resolve(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e} +;delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,n,o){var r=this;if(void 0===n&&(n=!1),void 0===o&&(o=!1),!o&&!this.isExpanded()){var s=function(e){e.needsChildrenRefresh=!0,e.forEachChild(s)};return s(this),Promise.resolve(this)}this.needsChildrenRefresh=!1;var a=function(){var o={item:r,isNested:n};return r._onRefreshChildren.fire(o),(r.doesHaveChildren?r.context.dataSource.getChildren(r.context.tree,r.element):Promise.resolve([])).then((function(n){if(r.isDisposed()||r.registry.isDisposed())return Promise.resolve(null);if(!Array.isArray(n))return Promise.reject(new Error("Please return an array of children."));n=n?n.slice(0):[],n=r.sort(n);for(var i={};null!==r.firstChild;)i[r.firstChild.id]=r.firstChild, +r.removeChild(r.firstChild);for(var o=0,s=n.length;o=0;o--)this.onInsertItem(u[o]);for(o=this.heightMap.length-1;o>=i;o--)this.onRefreshItem(this.heightMap[o]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,n=null,i=null,o=0,r=0;n=e.next();){if(o=this.indexes[n],!(t=this.heightMap[o]))return void console.error("view item doesnt exist");r-=t.height,delete this.indexes[n],this.onRemoveItem(t),null===i&&(i=o)}if(0!==r&&null!==i)for(this.heightMap.splice(i,o-i+1), +o=i;o=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},e.prototype.indexAfter=function(e){ +return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=[],this.indexes={}},e}();t.HeightMap=i})),define(n[256],i([0,1,16,181]),(function(e,t,n,i){"use strict";function o(t,n){if(/^(http:)|(https:)|(file:)/.test(t)){var i=String(window.location),o=i.substr(0,i.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(t.substring(0,o.length)!==o){var r="vs/base/worker/defaultWorkerFactory.js",s=e.toUrl(r).slice(0,-r.length);return"data:text/javascript;charset=utf-8,"+encodeURIComponent("/*"+n+"*/self.MonacoEnvironment={baseUrl: '"+s+"'};importScripts('"+t+"');/*"+n+"*/")}}return t+"#"+n}Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkerBootstrapUrl=o;var r=function(){ +function t(t,i,r,s,a){this.id=i;var l=function(t,i){if(n.globals.MonacoEnvironment){if("function"==typeof n.globals.MonacoEnvironment.getWorker)return n.globals.MonacoEnvironment.getWorker(t,i);if("function"==typeof n.globals.MonacoEnvironment.getWorkerUrl)return new Worker(n.globals.MonacoEnvironment.getWorkerUrl(t,i))}if("function"==typeof e){var r=o(e.toUrl("./"+t),i);return new Worker(r,{name:i})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",r);"function"==typeof l.then?this.worker=l:this.worker=Promise.resolve(l),this.postMessage(t,[]),this.worker.then((function(e){e.onmessage=function(e){s(e.data)},e.onmessageerror=a,"function"==typeof e.addEventListener&&e.addEventListener("error",a)}))}return t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e,t){this.worker&&this.worker.then((function(n){return n.postMessage(e,t)}))},t.prototype.dispose=function(){this.worker&&this.worker.then((function(e){ +return e.terminate()})),this.worker=null},t}(),s=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,o){var s=this,a=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new r(t,a,this._label||"anonymous"+a,n,(function(e){i.logOnceWebWorkerWarning(e),s._webWorkerFailedBeforeError=e,o(e)}))},e.LAST_WORKER_ID=0,e}();t.DefaultWorkerFactory=s})),define(n[257],i([9]),{}),define(n[258],i([9]),{}),define(n[259],i([9]),{}),define(n[135],i([0,1,8,46,27,4,30,259]),(function(e,t,n,i,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={inputActiveOptionBorder:o.Color.fromHex("#007ACC00"),inputActiveOptionBackground:o.Color.fromHex("#0E639C50")},u=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new s.Emitter),n.onChange=n._onChange.event,n._onKeyDown=n._register(new s.Emitter),n.onKeyDown=n._onKeyDown.event,n._opts=a.deepClone(t),a.mixin(n._opts,l,!1), +n._checked=n._opts.isChecked,n.domNode=document.createElement("div"),n.domNode.title=n._opts.title,n.domNode.className="monaco-custom-checkbox codicon "+(n._opts.actionClassName||"")+" "+(n._checked?"checked":"unchecked"),n.domNode.tabIndex=0,n.domNode.setAttribute("role","checkbox"),n.domNode.setAttribute("aria-checked",String(n._checked)),n.domNode.setAttribute("aria-label",n._opts.title),n.applyStyles(),n.onclick(n.domNode,(function(e){n.checked=!n._checked,n._onChange.fire(!1),e.preventDefault()})),n.ignoreGesture(n.domNode),n.onkeydown(n.domNode,(function(e){if(10===e.keyCode||3===e.keyCode)return n.checked=!n._checked,n._onChange.fire(!0),void e.preventDefault();n._onKeyDown.fire(e)})),n}return r(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return"true"!==this.domNode.getAttribute("aria-disabled")},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){ +this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()},t.prototype.applyStyles=function(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){ +n.removeTabIndexAndUpdateFocus(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(i.Widget);t.Checkbox=u})),define(n[260],i([9]),{}),define(n[261],i([9]),{}),define(n[101],i([0,1,5,260,261]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderCodicons=function(e){return n.escape(e).replace(/\$\((([a-z0-9\-]+?)(~([a-z0-9\-]*?))?)\)/gi,(function(e,t,n,i,o){return''}))}})),define(n[136],i([0,1,30,101,5]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.supportCodicons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,i,o,r){ +void 0===i&&(i=[]),void 0===o&&(o=""),t||(t=""),r&&(t=e.escapeNewLines(t,i)),this.didEverRender&&this.text===t&&this.title===o&&n.equals(this.highlights,i)||(Array.isArray(i)||(i=[]),this.text=t,this.title=o,this.highlights=i,this.render())},e.prototype.render=function(){for(var e="",t=0,n=0,r=this.highlights;n";var a=this.text.substring(t,s.start);e+=this.supportCodicons?i.renderCodicons(a):o.escape(a),e+="",t=s.end}e+='';var l=this.text.substring(s.start,s.end);e+=this.supportCodicons?i.renderCodicons(l):o.escape(l),e+="",t=s.end}}if(t";l=this.text.substring(t);e+=this.supportCodicons?i.renderCodicons(l):o.escape(l),e+=""}this.domNode.innerHTML=e,this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0},e.escapeNewLines=function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/g,(function(e,o){i="\r\n"===e?-1:0,o+=n +;for(var r=0,s=t;r=o&&(a.start+=i),a.end>=o&&(a.end+=i))}return n+=i,"⏎"}))},e}();t.HighlightedLabel=r})),define(n[262],i([9]),{}),define(n[263],i([0,1,8,16,2,100,87,262]),(function(e,t,n,i,o,s,a){"use strict";function l(e,t,n){var i=n.offset+n.size;return 0===n.position?t<=e-i?i:t<=n.offset?n.offset-t:Math.max(e-t,0):t<=n.offset?n.offset-t:t<=e-i?i:0}Object.defineProperty(t,"__esModule",{value:!0}),t.layout=l;var u=function(e){function t(t){var i=e.call(this)||this;return i.container=null,i.delegate=null,i.toDisposeOnClean=o.Disposable.None,i.toDisposeOnSetContainer=o.Disposable.None,i.view=n.$(".context-view"),n.hide(i.view),i.setContainer(t),i._register(o.toDisposable((function(){return i.setContainer(null)}))),i}return r(t,e),t.prototype.setContainer=function(e){var i=this;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.container.removeChild(this.view),this.container=null),e){this.container=e,this.container.appendChild(this.view) +;var r=new o.DisposableStore;t.BUBBLE_UP_EVENTS.forEach((function(e){r.add(n.addStandardDisposableListener(i.container,e,(function(e){i.onDOMEvent(e,!1)})))})),t.BUBBLE_DOWN_EVENTS.forEach((function(e){r.add(n.addStandardDisposableListener(i.container,e,(function(e){i.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=r}},t.prototype.show=function(e){this.isVisible()&&this.hide(),n.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",n.show(this.view),this.toDisposeOnClean=e.render(this.view)||o.Disposable.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()},t.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout||i.isIOS&&a.BrowserFeatures.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},t.prototype.doLayout=function(){if(this.isVisible()){var e,t=this.delegate.getAnchor();if(n.isHTMLElement(t)){var i=n.getDomNodePagePosition(t);e={top:i.top,left:i.left, +width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};var o,r=n.getTotalWidth(this.view),a=n.getTotalHeight(this.view),u=this.delegate.anchorPosition||0,d=this.delegate.anchorAlignment||0,c={offset:e.top-window.pageYOffset,size:e.height,position:0===u?0:1};o=0===d?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};var h=l(window.innerHeight,a,c)+window.pageYOffset;s.Range.intersects({start:h,end:h+a},{start:c.offset,end:c.offset+c.size})&&(o.size=e.width,1===d&&(o.offset=e.left));var p=l(window.innerWidth,r,o);n.removeClasses(this.view,"top","bottom","left","right"),n.addClass(this.view,0===u?"bottom":"top"),n.addClass(this.view,0===d?"left":"right");var f=n.getDomNodePagePosition(this.container);this.view.style.top=h-f.top+"px",this.view.style.left=p-f.left+"px",this.view.style.width="initial"}},t.prototype.hide=function(e){var t,i=this.delegate;this.delegate=null,(null===(t=i)||void 0===t?void 0:t.onHide)&&i.onHide(e), +this.toDisposeOnClean.dispose(),n.hide(this.view)},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!n.isAncestor(e.target,this.container)&&this.hide())},t.prototype.dispose=function(){this.hide(),e.prototype.dispose.call(this)},t.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],t.BUBBLE_DOWN_EVENTS=["click"],t}(o.Disposable);t.ContextView=u})),define(n[264],i([9]),{}),define(n[265],i([0,1,8,5,27,30,264]),(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={badgeBackground:o.Color.fromHex("#4D4D4D"),badgeForeground:o.Color.fromHex("#FFFFFF")},a=function(){function e(e,t){this.count=0,this.options=t||Object.create(null),r.mixin(this.options,s,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder, +this.element=n.append(e,n.$(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=i.format(this.countFormat,this.count),this.element.title=i.format(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",n=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":"", +this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}},e}();t.CountBadge=a})),define(n[182],i([9]),{}),define(n[266],i([9]),{}),define(n[137],i([0,1,8,136,2,100,30,266]),(function(e,t,n,i,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0 +}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),u=function(e){function t(t,o){var r,s,a=e.call(this)||this;a.domNode=a._register(new l(n.append(t,n.$(".monaco-icon-label"))));var u=n.append(a.domNode.element,n.$(".monaco-icon-label-container")),h=n.append(u,n.$("span.monaco-icon-name-container"));return a.descriptionContainer=a._register(new l(n.append(u,n.$("span.monaco-icon-description-container")))),(null===(r=o)||void 0===r?void 0:r.supportHighlights)?a.nameNode=new c(h,!!o.supportCodicons):a.nameNode=new d(h),(null===(s=o)||void 0===s?void 0:s.supportDescriptionHighlights)?a.descriptionNodeFactory=function(){return new i.HighlightedLabel(n.append(a.descriptionContainer.element,n.$("span.label-description")),!!o.supportCodicons)}:a.descriptionNodeFactory=function(){ +return a._register(new l(n.append(a.descriptionContainer.element,n.$("span.label-description"))))},a}return r(t,e),t.prototype.setLabel=function(e,t,n){var o,r,s,a=["monaco-icon-label"];n&&(n.extraClasses&&a.push.apply(a,n.extraClasses),n.italic&&a.push("italic")),this.domNode.className=a.join(" "),this.domNode.title=(null===(o=n)||void 0===o?void 0:o.title)||"",this.nameNode.setLabel(e,n),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof i.HighlightedLabel?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),(null===(r=n)||void 0===r?void 0:r.descriptionTitle)?this.descriptionNode.element.title=n.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=(null===(s=n)||void 0===s?void 0:s.descriptionTitle)||"",this.descriptionNode.empty=!t))},t}(o.Disposable);t.IconLabel=u;var d=function(){function e(e){this.container=e, +this.label=void 0,this.singleLabel=void 0}return e.prototype.setLabel=function(e,t){var i,o,r,s;if(this.label!==e||!a.equals(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerHTML="",n.removeClass(this.container,"multiple"),this.singleLabel=n.append(this.container,n.$("a.label-name",{id:null===(i=t)||void 0===i?void 0:i.domId}))),this.singleLabel.textContent=e;else{this.container.innerHTML="",n.addClass(this.container,"multiple"),this.singleLabel=void 0;for(var l=0;l=this.el.clientHeight-4)return this.orthogonalEndSash}else{if(e.offsetX<=4)return this.orthogonalStartSash;if(e.offsetX>=this.el.clientWidth-4)return this.orthogonalEndSash}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.el.remove()},t}(n.Disposable);t.Sash=f})),define(n[274],i([9]),{}),define(n[52],i([0,1,25,8,28,44,248,249,46,15,4,2,16,176,274]),(function(e,t,n,i,o,s,a,l,u,d,c,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0 +},m=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},e.prototype.accept=function(e,t,n){var i=new g(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}();t.MouseWheelClassifier=m +;var v=function(e){function t(t,n,i){var r=e.call(this)||this;r._onScroll=r._register(new c.Emitter),r.onScroll=r._onScroll.event,t.style.overflow="hidden",r._options=b(n),r._scrollable=i,r._register(r._scrollable.onScroll((function(e){r._onDidScroll(e),r._onScroll.fire(e)})));var s={onMouseWheel:function(e){return r._onMouseWheel(e)},onDragStart:function(){return r._onDragStart()},onDragEnd:function(){return r._onDragEnd()}};return r._verticalScrollbar=r._register(new l.VerticalScrollbar(r._scrollable,r._options,s)),r._horizontalScrollbar=r._register(new a.HorizontalScrollbar(r._scrollable,r._options,s)),r._domNode=document.createElement("div"),r._domNode.className="monaco-scrollable-element "+r._options.className,r._domNode.setAttribute("role","presentation"),r._domNode.style.position="relative",r._domNode.style.overflow="hidden",r._domNode.appendChild(t),r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode),r._domNode.appendChild(r._verticalScrollbar.domNode.domNode), +r._options.useShadows?(r._leftShadowDomNode=o.createFastDomNode(document.createElement("div")),r._leftShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._leftShadowDomNode.domNode),r._topShadowDomNode=o.createFastDomNode(document.createElement("div")),r._topShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._topShadowDomNode.domNode),r._topLeftShadowDomNode=o.createFastDomNode(document.createElement("div")),r._topLeftShadowDomNode.setClassName("shadow top-left-corner"),r._domNode.appendChild(r._topLeftShadowDomNode.domNode)):(r._leftShadowDomNode=null,r._topShadowDomNode=null,r._topLeftShadowDomNode=null),r._listenOnDomNode=r._options.listenOnDomNode||r._domNode,r._mouseWheelToDispose=[],r._setListeningToMouseWheel(r._options.handleMouseWheel),r.onmouseover(r._listenOnDomNode,(function(e){return r._onMouseOver(e)})),r.onnonbubblingmouseout(r._listenOnDomNode,(function(e){return r._onMouseOut(e)})),r._hideTimeout=r._register(new d.TimeoutTimer),r._isDragging=!1,r._mouseIsOver=!1, +r._shouldRender=!0,r._revealOnScroll=!0,r}return r(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=h.dispose(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,p.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=b(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity, +this._options.fastScrollSensitivity=t.fastScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=h.dispose(this._mouseWheelToDispose),e)){this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,n.isEdgeOrIE?"mousewheel":"wheel",(function(e){t._onMouseWheel(new s.StandardWheelEvent(e))}),{passive:!1}))}},t.prototype._onMouseWheel=function(e){var t,n=m.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var r=!p.isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity, +i*=this._options.fastScrollSensitivity);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var l=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,l)}if(o){var u=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,u)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){ +if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}, +t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)},t}(u.Widget);t.AbstractScrollableElement=v;var _=function(e){function t(t,n){var o=this;(n=n||{}).mouseWheelSmoothScroll=!1;var r=new f.Scrollable(0,(function(e){return i.scheduleAtNextAnimationFrame(e)}));return(o=e.call(this,t,n,r)||this)._register(r),o}return r(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(v);t.ScrollableElement=_;var y=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t}(v);t.SmoothScrollableElement=y;var C=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){ +e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return r(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(_);function b(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1, +fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize, +t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.isMacintosh&&(t.className+=" mac"),t}t.DomScrollableElement=C}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=this.items.length?(this.rangeMap=new d.RangeMap,this.rangeMap.splice(0,0,v),this.items=v,h=[]):(this.rangeMap.splice(e,t,v), +h=(o=this.items).splice.apply(o,a([e,t],v)));var _=n.length-t,y=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),C=d.shift(g,_),b=f.Range.intersect(y,C);for(c=b.start;c=-1&&en&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}},e.prototype.teardownDragAndDropScrollTopAnimation=function(){this.dragOverAnimationStopDisposable.dispose(), +this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},e.prototype.getItemIndexFromEventTarget=function(e){for(var t=e;t instanceof HTMLElement&&t!==this.rowsContainer;){var n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}t=t.parentElement}},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype._rerender=function(e,t){var n,i,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,i=0):o.end-o.start>1&&(n=o.start+1,i=this.elementTop(n)-e);for(var r=0;;){for(var s=this.getRenderRange(e,t),a=!1,l=s.start;l=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,d=[],c=!1;if(!u)c=(d=new a.LcsDiff({getElements:function(){return o}},{getElements:function(){return r.map((function(e){return e.id}))}},null).ComputeDiff(!1).changes).some((function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n0&&this.onRemoveItems(new p.ArrayIterator(o,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var m=r[g.modifiedStart-1]||n +;m=m.getDepth()>0?m:null,this.onInsertItems(new p.ArrayIterator(r,g.modifiedStart,g.modifiedStart+g.modifiedLength),m?m.id:null)}}else(u||d.length)&&(this.onRemoveItems(new p.ArrayIterator(o)),this.onInsertItems(new p.ArrayIterator(r),n.getDepth()>0?n.id:null));(u||d.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id)||0,o=this.scrollTop;n.top+n.height<=this.scrollTop&&(o+=i),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(new p.MappedIterator(t.getNavigator(),(function(e){return e&&e.id}))), +this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0:n)>1?1:n;var o=i.height-this.viewHeight;this.scrollTop=o*n+i.top}else{var r=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(s.addClass(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(s.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();s.toggleClass(this.domNode,"no-focused-item",!e), +e?this.domNode.setAttribute("aria-activedescendant",u.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&(i.isIE&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}}, +t.prototype.onMouseMiddleClick=function(e){if(this.context.controller.onMouseMiddleClick){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&this.context.controller.onMouseMiddleClick(this.context.tree,n.model.getElement(),t)}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseDown(this.context.tree,i.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseUp(this.context.tree,i.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget) +;t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i=new c.StandardKeyboardEvent(e),o=void 0;if(n=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,n),a=this.items[r];o=s.getDomNodePagePosition(a.element)}else n=this.model.getInput(),o=s.getDomNodePagePosition(this.inputItem.element);t=new m.KeyboardContextMenuEvent(o.left+o.width,o.top,i)}else{var l=new d.StandardMouseEvent(e),u=this.getItemAround(l.target);if(!u)return;n=u.model.getElement(),t=new m.MouseContextMenuEvent(l)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new c.StandardKeyboardEvent(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode, +t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||(this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),this.context.controller.onKeyDown(this.context.tree,t))},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new c.StandardKeyboardEvent(e))},t.prototype.onDragStart=function(e,t){if(!this.model.getHighlight()){var n,i=e.model.getElement(),o=this.model.getSelection();if(n=o.indexOf(i)>-1?o:[i],t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setData(_.DataTransfers.RESOURCES,JSON.stringify([e.uri])),t.dataTransfer.setDragImage){var r=void 0;r=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,n):String(n.length);var s=document.createElement("div");s.className="monaco-tree-drag-image",s.textContent=r,document.body.appendChild(s),t.dataTransfer.setDragImage(s,-10,-10),setTimeout((function(){ +return document.body.removeChild(s)}),0)}this.currentDragAndDropData=new h.ElementsDragAndDropData(n),_.StaticDND.CurrentDragAndDropData=new h.ExternalElementsDragAndDropData(n),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new d.DragMouseEvent(t))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=s.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(null!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null), +this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var t=this;e.preventDefault();var n,i=new d.DragMouseEvent(e),r=this.getItemAround(i.target);if(!r||0===i.posx&&0===i.posy&&i.browserEvent.type===s.EventType.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData)if(_.StaticDND.CurrentDragAndDropData)this.currentDragAndDropData=_.StaticDND.CurrentDragAndDropData;else{if(!i.dataTransfer.types)return!1;this.currentDragAndDropData=new h.DesktopDragAndDropData} +this.currentDragAndDropData.update(i.browserEvent.dataTransfer);var a,l=r.model;do{if(n=l?l.getElement():this.model.getInput(),!(a=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,n,i))||1!==a.bubble)break;l=l&&l.parent}while(l);if(!l)return this.currentDropElement=null,!1;var u=a&&a.accept;u?(this.currentDropElement=l.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=0===a.effect?"copy":"move"):this.currentDropElement=null;var c,p,f=l.id===this.inputItem.id?this.inputItem:this.items[l.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==f||(c=this.currentDropElementReaction,p=a,!(!c&&!p||c&&p&&c.accept===p.accept&&c.bubble===p.bubble&&c.effect===p.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.currentDropTarget=f,this.currentDropElementReaction=a,u)){ +if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),0===a.bubble)for(var g=l.getNavigator(),m=void 0;m=g.next();)(r=this.items[m.id])&&(r.dropTarget=!0,this.currentDropTargets.push(r));if(a.autoExpand){var v=C.timeout(500);this.currentDropDisposable=o.toDisposable((function(){return v.cancel()})),v.then((function(){return t.context.tree.expand(t.currentDropElement)})).then((function(){return t.shouldInvalidateDropReaction=!0}))}}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new d.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t.browserEvent.dataTransfer),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]), +this.currentDropDisposable.dispose(),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,_.StaticDND.CurrentDragAndDropData=void 0,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||s.addClass(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||s.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){ +e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem,i=e;do{if(i[t.BINDING]&&(n=i[t.BINDING]),i===this.wrapper||i===this.domNode)return n;if(i===this.scrollableElement.getDomNode()||i===document.body)return}while(i=i.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=o.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.viewListeners=o.dispose(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(), +this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.items&&Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.context.cache&&this.context.cache.dispose(),this.gestureDisposable.dispose(),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t}(g.HeightMap);t.TreeView=E})),define(n[276],i([9]),{});var p;a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0&&(this.proportions=this.viewItems.map((function(t){return t.size/e.contentSize})))},t.prototype.onSashStart=function(e){for(var t=this,i=e.sash,o=e.start,r=e.alt,s=0,a=this.viewItems;s=this.viewItems.length||(t="number"==typeof t?t:e.size,t=l.clamp(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))},t.prototype.resizeView=function(e,t){var n=this;if(this.state!==p.Idle)throw new Error("Cant modify splitview");if(this.state=p.Busy,!(e<0||e>=this.viewItems.length)){var i=u.range(this.viewItems.length).filter((function(t){return t!==e})),o=a(i.filter((function(e){return 1===n.viewItems[e].priority})),[e]),r=i.filter((function(e){return 2===n.viewItems[e].priority})),s=this.viewItems[e];t=Math.round(t),t=l.clamp(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(o,r),this.state=p.Idle}},t.prototype.distributeViewSizes=function(){for(var e=this,t=[],n=0,i=0,o=this.viewItems;i0&&(t.push(d),n+=d.size)}for(var r=Math.floor(n/t.length),s=0,a=t;s=this.viewItems.length?-1:this.viewItems[e].size},t.prototype.doAddView=function(e,t,o,r){var a=this;if(void 0===o&&(o=this.viewItems.length),this.state!==p.Idle)throw new Error("Cant modify splitview");this.state=p.Busy;var l=s.$(".split-view-view");o===this.viewItems.length?this.viewContainer.appendChild(l):this.viewContainer.insertBefore(l,this.viewContainer.children.item(o));var c,h=e.onDidChange((function(e){return a.onViewChange(y,e)})),f=n.toDisposable((function(){return a.viewContainer.removeChild(l)})),g=n.combinedDisposable(h,f);c="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize +;var _,y=0===this.orientation?new m(l,e,c,g):new v(l,e,c,g);if(this.viewItems.splice(o,0,y),this.viewItems.length>1){var C=0===this.orientation?1:0,b=0===this.orientation?{getHorizontalSashTop:function(e){return a.getSashPosition(e)}}:{getVerticalSashLeft:function(e){return a.getSashPosition(e)}},S=new d.Sash(this.sashContainer,b,{orientation:C,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),w=0===this.orientation?function(e){return{sash:S,start:e.startY,current:e.currentY,alt:e.altKey}}:function(e){return{sash:S,start:e.startX,current:e.currentX,alt:e.altKey}},E=i.Event.map(S.onDidStart,w)(this.onSashStart,this),L=i.Event.map(S.onDidChange,w)(this.onSashChange,this),D=i.Event.map(S.onDidEnd,(function(){return u.firstIndex(a.sashItems,(function(e){return e.sash===S}))}))(this.onSashEnd,this),N=S.onDidReset((function(){var e=u.firstIndex(a.sashItems,(function(e){return e.sash===S +})),t=u.range(e,-1),n=u.range(e+1,a.viewItems.length),i=a.findFirstSnapIndex(t),o=a.findFirstSnapIndex(n);("number"!=typeof i||a.viewItems[i].visible)&&("number"!=typeof o||a.viewItems[o].visible)&&a._onDidSashReset.fire(e)})),x=n.combinedDisposable(E,L,D,N,S),I={sash:S,disposable:x};this.sashItems.splice(o-1,0,I)}l.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(_=[t.index]),r||this.relayout([o],_),this.state=p.Idle,r||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()},t.prototype.relayout=function(e,t){var n=this.viewItems.reduce((function(e,t){return e+t.size}),0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()},t.prototype.resize=function(e,t,n,i,o,r,s,a,d){var c=this;if(void 0===n&&(n=this.viewItems.map((function(e){return e.size}))),void 0===r&&(r=Number.NEGATIVE_INFINITY),void 0===s&&(s=Number.POSITIVE_INFINITY),e<0||e>=this.viewItems.length)return 0 +;var h=u.range(e,-1),p=u.range(e+1,this.viewItems.length);if(o)for(var f=0,g=o;f=a.limitDelta)!==k.visible,k.setVisible(T,a.size)}if(!M&&d){var T;k=this.viewItems[d.index];M=(T=t0||e}));e=!1;var n=this.viewItems.map((function(t){return e=t.maximumSize-t.size>0||e})),i=a(this.viewItems).reverse();e=!1;var o=i.map((function(t){return e=t.size-t.minimumSize>0||e})).reverse();e=!1;for(var r=i.map((function(t){return e=t.maximumSize-t.size>0||e})).reverse(),s=0,l=0;l0||this.startSnappingEnabled)?d.state=1:_&&t[l]&&(s0)return;if(!s.visible&&s.snap)return i}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.viewItems.forEach((function(e){return e.dispose()})),this.viewItems=[],this.sashItems.forEach((function(e){return e.disposable.dispose()})),this.sashItems=[]},t}(n.Disposable);t.SplitView=_})),define(n[278],i([9]),{}),define(n[279],i([9]),{}),define(n[280],i([9]),{}),define(n[281],i([0,1,134,254,275,4,27,30,280]),(function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e,t,i){if(void 0===i&&(i={}), +this.tree=e,this.configuration=t,this.options=i,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new n.DefaultController({clickBehavior:1,keyboardSupport:"boolean"!=typeof i.keyboardSupport||i.keyboardSupport}),this.dnd=t.dnd||new n.DefaultDragAndDrop,this.filter=t.filter||new n.DefaultFilter,this.sorter=t.sorter,this.accessibilityProvider=t.accessibilityProvider||new n.DefaultAccessibilityProvider,this.styler=t.styler};t.TreeContext=l;var u={listFocusBackground:s.Color.fromHex("#073655"),listActiveSelectionBackground:s.Color.fromHex("#0E639C"),listActiveSelectionForeground:s.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:s.Color.fromHex("#094771"),listFocusAndSelectionForeground:s.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:s.Color.fromHex("#3F3F46"),listHoverBackground:s.Color.fromHex("#2A2D2E"),listDropBackground:s.Color.fromHex("#383B3D")},d=function(){function e(e,t,n){ +void 0===n&&(n={}),this._onDidChangeFocus=new r.Relay,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new r.Relay,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new r.Relay,this._onDidExpandItem=new r.Relay,this._onDidCollapseItem=new r.Relay,this._onDispose=new r.Emitter,this.onDidDispose=this._onDispose.event,this.container=e,a.mixin(n,u,!1),n.twistiePixels="number"==typeof n.twistiePixels?n.twistiePixels:32,n.showTwistie=!1!==n.showTwistie,n.indentPixels="number"==typeof n.indentPixels?n.indentPixels:12,n.alwaysFocused=!0===n.alwaysFocused,n.useShadows=!1!==n.useShadows,n.paddingOnRow=!1!==n.paddingOnRow,n.showLoading=!1!==n.showLoading,this.context=new l(this,t,n),this.model=new i.TreeModel(this.context),this.view=new o.TreeView(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect, +this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t) +},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)}, +e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),this.model.dispose(),this.view.dispose(),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}();t.Tree=d})),define(n[282],i([9]),{}),define(n[283],i([9]),{}),define(n[284],i([9]),{}),define(n[285],i([9]),{}),define(n[286],i([9]),{}),define(n[287],i([9]),{}),define(n[288],i([9]),{}),define(n[289],i([9]),{}),define(n[290],i([9]),{}),define(n[291],i([9]),{}),define(n[292],i([9]),{}),define(n[293],i([9]),{}),define(n[294],i([9]),{}),define(n[295],i([9]),{}),define(n[296],i([9]),{}),define(n[297],i([9]),{}),define(n[298],i([9]),{}), +define(n[299],i([9]),{}),define(n[300],i([9]),{}),define(n[301],i([9]),{}),define(n[302],i([9]),{}),define(n[303],i([9]),{}),define(n[304],i([9]),{}),define(n[305],i([9]),{}),define(n[306],i([9]),{}),define(n[307],i([9]),{}),define(n[308],i([9]),{}),define(n[309],i([9]),{}),define(n[310],i([9]),{}),define(n[311],i([9]),{}),define(n[312],i([9]),{}),define(n[313],i([9]),{}),define(n[314],i([9]),{}),define(n[315],i([9]),{}),define(n[316],i([9]),{}),define(n[317],i([9]),{}),define(n[318],i([9]),{}),define(n[319],i([9]),{}),define(n[320],i([9]),{}),define(n[321],i([9]),{}),define(n[322],i([9]),{}),define(n[323],i([9]),{}),define(n[324],i([9]),{}),define(n[325],i([9]),{}),define(n[326],i([9]),{}),define(n[327],i([9]),{}),define(n[328],i([9]),{}),define(n[329],i([9]),{}),define(n[330],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}();t.CharWidthRequest=n +;var i=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold", +i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests;s96?t<=2?(e+96)%96:95:e}})),define(n[333],i([0,1,183]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;ie.width||i+d>e.height)console.warn("bad render request outside image data");else for(var c=l?this.charDataLight:this.charDataNormal,h=n.getCharIndex(o,a),p=4*e.width,f=s.r,g=s.g,m=s.b,v=r.r-f,_=r.g-g,y=r.b-m,C=e.data,b=h*u*d,S=i*p+4*t,w=0;we.width||n+a>e.height)console.warn("bad render request outside image data");else for(var l=4*e.width,u=o.r,d=o.g,c=o.b,h=u+.5*(i.r-u),p=d+.5*(i.g-d),f=c+.5*(i.b-c),g=e.data,m=n*l+4*t,v=0;v>1]=i[e[n]]<<4|15&i[e[n+1]] +;return t};t.prebakedMiniMaps={1:n.once((function(){return o("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:n.once((function(){ +return o("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126") +}))}})),define(n[335],i([0,1,333,183,334]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.create=function(t,i){return this.lastCreated&&t===this.lastCreated.scale&&i===this.lastFontFamily?this.lastCreated:(r=o.prebakedMiniMaps[t]?new n.MinimapCharRenderer(o.prebakedMiniMaps[t](),t):e.createFromSampleData(e.createSampleData(i).data,t),this.lastFontFamily=i,this.lastCreated=r,r);var r},e.createSampleData=function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold 16px "+e,n.textBaseline="middle";for(var o=0,r=0,s=i.allCharCodes;r0)for(var u=255/a,d=0;d=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=i;var o=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=o})),define(n[88],i([0,1,78]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o,s=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;in||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){ +return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.strictContainsRange=function(t){return e.strictContainsRange(this,t)},e.strictContainsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}, +e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,l=n.startColumn,u=n.endLineNumber,d=n.endColumn;return iu?(r=u,s=d):r===u&&(s=Math.min(s,d)),i>r?null:i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){ +return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){ +return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}();t.Range=i})),define(n[184],i([0,1,5,13,3]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)}, +e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,i,o){if(!e)return{text:"",replaceCharCnt:0 +};var r=e.value,s=e.selectionStart,a=e.selectionEnd,l=t.value,u=t.selectionStart,d=t.selectionEnd;o&&r.length>0&&s===a&&u===d&&!n.startsWith(l,r)&&n.endsWith(l,r)&&(s=0,a=0);var c=r.substring(a),h=l.substring(d),p=n.commonSuffixLength(c,h);l=l.substring(0,l.length-p);var f=(r=r.substring(0,r.length-p)).substring(0,s),g=l.substring(0,u),m=n.commonPrefixLength(f,g);if(l=l.substring(m),r=r.substring(m),u-=m,s-=m,d-=m,a-=m,i&&u===d&&r.length>0){var v=null;if(u===l.length?n.startsWith(l,r)&&(v=l.substring(r.length)):n.endsWith(l,r)&&(v=l.substring(0,l.length-r.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||n.containsEmoji(v)))return{text:v,replaceCharCnt:0}}return u===d?r===l&&0===s&&a===r.length&&u===l.length&&-1===l.indexOf("\n")&&n.containsFullWidthCharacter(l)?{text:"",replaceCharCnt:0}:{text:l,replaceCharCnt:f.length-m}:{text:l,replaceCharCnt:a-s}},e.EMPTY=new e("",0,0,null,null),e}();t.TextAreaState=r;var s=function(){function e(){}return e._getPageOfLine=function(e,t){return Math.floor((e-1)/t)}, +e._getRangeForPage=function(e,t){var n=e*t,i=n+1,r=n+t;return new o.Range(i,1,r+1,1)},e.fromEditorSelection=function(t,n,s,a,l){var u,d=e._getPageOfLine(s.startLineNumber,a),c=e._getRangeForPage(d,a),h=e._getPageOfLine(s.endLineNumber,a),p=e._getRangeForPage(h,a),f=c.intersectRanges(new o.Range(1,1,s.startLineNumber,s.startColumn)),g=n.getValueInRange(f,1),m=n.getLineCount(),v=n.getLineMaxColumn(m),_=p.intersectRanges(new o.Range(s.endLineNumber,s.endColumn,m,v)),y=n.getValueInRange(_,1);if(d===h||d+1===h)u=n.getValueInRange(s,1);else{var C=c.intersectRanges(s),b=p.intersectRanges(s);u=n.getValueInRange(C,1)+String.fromCharCode(8230)+n.getValueInRange(b,1)}if(l){g.length>500&&(g=g.substring(g.length-500,g.length)),y.length>500&&(y=y.substring(0,500)),u.length>1e3&&(u=u.substring(0,500)+String.fromCharCode(8230)+u.substring(u.length-500,u.length))}return new r(g+u+y,g.length,g.length+u.length,new i.Position(s.startLineNumber,s.startColumn),new i.Position(s.endLineNumber,s.endColumn))},e}() +;t.PagedScreenReaderStrategy=s})),define(n[185],i([0,1,121,4,2,30,3]),(function(e,t,n,i,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(e){function t(t,n){void 0===n&&(n={});var o=e.call(this)||this;return o._onDidUpdate=o._register(new i.Emitter),o._editor=t,o._options=s.mixin(n,l,!1),o.disposed=!1,o.nextIdx=-1,o.ranges=[],o.ignoreSelectionChange=!1,o.revealFirst=Boolean(o._options.alwaysRevealFirst),o._register(o._editor.onDidDispose((function(){return o.dispose()}))),o._register(o._editor.onDidUpdateDiff((function(){return o._onDiffUpdated()}))),o._options.followsCaret&&o._register(o._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){o.ignoreSelectionChange||(o.nextIdx=-1)}))),o._options.alwaysRevealFirst&&o._register(o._editor.getModifiedEditor().onDidChangeModel((function(e){o.revealFirst=!0}))),o._init(),o}return r(t,e),t.prototype._init=function(){this._editor.getLineChanges()}, +t.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},t.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new a.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new a.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)},t.prototype._initIdx=function(e){var t=!1,n=this._editor.getPosition();if(n){for(var i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var o=i.range.getStartPosition();this._editor.setPosition(o),this._editor.revealPositionInCenter(o,t)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},t.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.ranges=[],this.disposed=!0},t}(o.Disposable) +;t.DiffNavigator=u})),define(n[58],i([0,1,3]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.insert=function(e,t){return{range:new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=i})),define(n[336],i([0,1,5,58,3]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this._selection=e,this._cursors=t,this._selectionId=null}return e.prototype.getEditOperations=function(e,t){for(var n=s(e,this._cursors),i=0,o=n.length;i=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);for(var s=[],a=0,l=0,u=t.length,d=1,c=e.getLineCount();d<=c;d++){var h=e.getLineContent(d),p=h.length+1,f=0;if(!(l255?255:0|e},e.Empty=new e(0,0,0,0),e}();t.RGBA8=n})),define(n[21],i([0,1,13,3]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){ +function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r}return r(t,e),t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){ +return new n.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null +;for(var r=0,s=0,a=n;a<=i;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(n,s.toLineNumber),u=a;u<=l;u++){var d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),i=!0}}return i},e}();t.RenderedLinesCollection=o;var r=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new o((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=n.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return!!e.hasChanged(103)},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){ +return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt)(l=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,l,s,i,t),o.linesLength+=s-l+1);else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,l=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-l+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var l=r+a;s[a].layoutLine(l,i[l-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&a()){var m=i.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),v=s.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),_=r(m,v,a,!0).changes;d&&(_=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],i=1,r=e.length;i1&&C>1;){if(v.charCodeAt(y-2)!==_.charCodeAt(C-2))break;y--,C--}(y>1||C>1)&&this._pushTrimWhitespaceCharChange(a,l+1,1,y,d+1,1,C);for(var b=h(v,1),S=h(_,1),w=v.length+1,E=_.length+1;b=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return n.onUnexpectedError(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop() +;try{e.redo(this.model)}catch(e){return n.onUnexpectedError(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}();t.EditStack=s})),define(n[341],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){this.spacesDiff=0,this.looksLikeAlignment=!1};function i(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||u>0&&d>0)){var c=Math.abs(a-d),h=Math.abs(s-u);if(0===c)return o.spacesDiff=h,void(h>0&&0<=u-1&&u-10?s++:_>1&&a++,i(l,u,f,v,c),!c.looksLikeAlignment||o&&t===c.spacesDiff)){var w=c.spacesDiff;w<=8&&d[w]++,l=f,u=v}}var E=o;s!==a&&(E=sD&&(D=t,L=e)})),4===L&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(L=2)}return{insertSpaces:E,tabSize:L}}})),define(n[342],i([0,1]),(function(e,t){"use strict";function n(e){return(1&e.metadata)>>>0}function i(e,t){e.metadata=254&e.metadata|t<<0}function o(e){return(2&e.metadata)>>>1==1}function r(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function s(e){return(4&e.metadata)>>>2==1}function a(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function l(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function u(e,t){ +e.metadata=207&e.metadata|t<<4}function d(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeColor=n,t.getNodeIsInOverviewRuler=function(e){return(8&e.metadata)>>>3==1};var c=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,i(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,a(this,!1),u(this,1),l(this,!1),d(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,r(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;a(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),u(this,this.options.stickiness),l(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)), +d(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();t.IntervalNode=c,t.SENTINEL=new c(null,0,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,i(t.SENTINEL,0);var h=function(){function e(){this.root=t.SENTINEL,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,n,i,a,l){return this.root===t.SENTINEL?[]:function(e,n,i,a,l,u){var d=e.root,c=0,h=0,p=0,f=[],g=0;for(;d!==t.SENTINEL;)if(o(d))r(d.left,!1),r(d.right,!1),d===d.parent.right&&(c-=d.parent.delta),d=d.parent;else{if(!o(d.left)){if(c+d.maxEndi)r(d,!0);else{if((p=c+d.end)>=n){d.setCachedOffsets(h,p,u);var m=!0;a&&d.ownerId&&d.ownerId!==a&&(m=!1),l&&s(d)&&(m=!1),m&&(f[g++]=d)} +r(d,!0),d.right===t.SENTINEL||o(d.right)||(c+=d.delta,d=d.right)}}return r(e.root,!1),f}(this,e,n,i,a,l)},e.prototype.search=function(e,n,i){return this.root===t.SENTINEL?[]:function(e,n,i,a){var l=e.root,u=0,d=0,c=0,h=[],p=0;for(;l!==t.SENTINEL;)if(o(l))r(l.left,!1),r(l.right,!1),l===l.parent.right&&(u-=l.parent.delta),l=l.parent;else if(l.left===t.SENTINEL||o(l.left)){d=u+l.start,c=u+l.end,l.setCachedOffsets(d,c,a);var f=!0;n&&l.ownerId&&l.ownerId!==n&&(f=!1),i&&s(l)&&(f=!1),f&&(h[p++]=l),r(l,!0),l.right===t.SENTINEL||o(l.right)||(u+=l.delta,l=l.right)}else l=l.left;return r(e.root,!1),h}(this,e,n,i)},e.prototype.collectNodesFromOwner=function(e){return function(e,n){var i=e.root,s=[],a=0;for(;i!==t.SENTINEL;)o(i)?(r(i.left,!1),r(i.right,!1),i=i.parent):i.left===t.SENTINEL||o(i.left)?(i.ownerId===n&&(s[a++]=i),r(i,!0),i.right===t.SENTINEL||o(i.right)||(i=i.right)):i=i.left;return r(e.root,!1),s}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var n=e.root,i=[],s=0 +;for(;n!==t.SENTINEL;)o(n)?(r(n.left,!1),r(n.right,!1),n=n.parent):n.left===t.SENTINEL||o(n.left)?n.right===t.SENTINEL||o(n.right)?(i[s++]=n,r(n,!0)):n=n.right:n=n.left;return r(e.root,!1),i}(this)},e.prototype.insert=function(e){g(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){m(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,n,i,s){for(var a=function(e,n,i){var s=e.root,a=0,l=0,u=0,d=[],c=0;for(;s!==t.SENTINEL;)if(o(s))r(s.left,!1),r(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!o(s.left)){if(a+s.maxEndi?r(s,!0):((u=a+s.end)>=n&&(s.setCachedOffsets(l,u,0),d[c++]=s),r(s,!0),s.right===t.SENTINEL||o(s.right)||(a+=s.delta,s=s.right))}return r(e.root,!1),d +}(this,e,e+n),l=0,u=a.length;li?(a.start+=u,a.end+=u,a.delta+=u,(a.delta<-1073741824||a.delta>1073741824)&&(e.requestNormalizeDelta=!0),r(a,!0)):(r(a,!0),a.right===t.SENTINEL||o(a.right)||(l+=a.delta,a=a.right))}r(e.root,!1)}(this,e,e+n,i),this._normalizeDeltaIfNecessary();for(l=0,u=a.length;ln)&&(1!==i&&(2===i||t))}function f(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=n-t,u=i,d=Math.min(l,u),c=e.start,h=!1,f=e.end,g=!1;t<=c&&f<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,g=!0);var m=o?1:l>0?2:0;if(!h&&p(c,s,t,m)&&(h=!0),!g&&p(f,a,t,m)&&(g=!0),d>0&&!o){m=l>u?2:0;!h&&p(c,s,t+d,m)&&(h=!0),!g&&p(f,a,t+d,m)&&(g=!0)}m=o?1:0;!h&&p(c,s,n,m)&&(e.start=t+u,h=!0),!g&&p(f,a,n,m)&&(e.end=t+u,g=!0);var v=u-l;h||(e.start=Math.max(0,c+v)),g||(e.end=Math.max(0,f+v)),e.start>e.end&&(e.end=e.start)}function g(e,o){if(e.root===t.SENTINEL)return o.parent=t.SENTINEL,o.left=t.SENTINEL,o.right=t.SENTINEL,i(o,0),e.root=o,e.root;!function(e,n){var o=0,r=e.root,s=n.start,a=n.end;for(;;){if(w(s,a,r.start+o,r.end+o)<0){if(r.left===t.SENTINEL){n.start-=o, +n.end-=o,n.maxEnd-=o,r.left=n;break}r=r.left}else{if(r.right===t.SENTINEL){n.start-=o+r.delta,n.end-=o+r.delta,n.maxEnd-=o+r.delta,r.right=n;break}o+=r.delta,r=r.right}}n.parent=r,n.left=t.SENTINEL,n.right=t.SENTINEL,i(n,1)}(e,o),S(o.parent);for(var r=o;r!==e.root&&1===n(r.parent);){var s;if(r.parent===r.parent.parent.left)1===n(s=r.parent.parent.right)?(i(r.parent,0),i(s,0),i(r.parent.parent,1),r=r.parent.parent):(r===r.parent.right&&_(e,r=r.parent),i(r.parent,0),i(r.parent.parent,1),y(e,r.parent.parent));else 1===n(s=r.parent.parent.left)?(i(r.parent,0),i(s,0),i(r.parent.parent,1),r=r.parent.parent):(r===r.parent.left&&y(e,r=r.parent),i(r.parent,0),i(r.parent.parent,1),_(e,r.parent.parent))}return i(e.root,0),o}function m(e,o){var r,s;if(o.left===t.SENTINEL?(s=o,(r=o.right).delta+=o.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=o.delta,r.end+=o.delta):o.right===t.SENTINEL?(r=o.left,s=o):((r=(s=function(e){for(;e.left!==t.SENTINEL;)e=e.left;return e +}(o.right)).right).start+=s.delta,r.end+=s.delta,r.delta+=s.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),s.start+=o.delta,s.end+=o.delta,s.delta=o.delta,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0)),s===e.root)return e.root=r,i(r,0),o.detach(),v(),b(r),void(e.root.parent=t.SENTINEL);var a,l=1===n(s);if(s===s.parent.left?s.parent.left=r:s.parent.right=r,s===o?r.parent=s.parent:(s.parent===o?r.parent=s:r.parent=s.parent,s.left=o.left,s.right=o.right,s.parent=o.parent,i(s,n(o)),o===e.root?e.root=s:o===o.parent.left?o.parent.left=s:o.parent.right=s,s.left!==t.SENTINEL&&(s.left.parent=s),s.right!==t.SENTINEL&&(s.right.parent=s)),o.detach(),l)return S(r.parent),s!==o&&(S(s),S(s.parent)),void v();for(S(r),S(r.parent),s!==o&&(S(s),S(s.parent));r!==e.root&&0===n(r);)r===r.parent.left?(1===n(a=r.parent.right)&&(i(a,0),i(r.parent,1),_(e,r.parent),a=r.parent.right),0===n(a.left)&&0===n(a.right)?(i(a,1),r=r.parent):(0===n(a.right)&&(i(a.left,0),i(a,1),y(e,a), +a=r.parent.right),i(a,n(r.parent)),i(r.parent,0),i(a.right,0),_(e,r.parent),r=e.root)):(1===n(a=r.parent.left)&&(i(a,0),i(r.parent,1),y(e,r.parent),a=r.parent.left),0===n(a.left)&&0===n(a.right)?(i(a,1),r=r.parent):(0===n(a.left)&&(i(a.right,0),i(a,1),_(e,a),a=r.parent.left),i(a,n(r.parent)),i(r.parent,0),i(a.left,0),y(e,r.parent),r=e.root));i(r,0),v()}function v(){t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.delta=0,t.SENTINEL.start=0,t.SENTINEL.end=0}function _(e,n){var i=n.right;i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=n.delta,i.end+=n.delta,n.right=i.left,i.left!==t.SENTINEL&&(i.left.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n===n.parent.left?n.parent.left=i:n.parent.right=i,i.left=n,n.parent=i,b(n),b(i)}function y(e,n){var i=n.left;n.delta-=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start-=i.delta,n.end-=i.delta,n.left=i.right,i.right!==t.SENTINEL&&(i.right.parent=n),i.parent=n.parent, +n.parent===t.SENTINEL?e.root=i:n===n.parent.right?n.parent.right=i:n.parent.left=i,i.right=n,n.parent=i,b(n),b(i)}function C(e){var n=e.end;if(e.left!==t.SENTINEL){var i=e.left.maxEnd;i>n&&(n=i)}if(e.right!==t.SENTINEL){var o=e.right.maxEnd+e.delta;o>n&&(n=o)}return n}function b(e){e.maxEnd=C(e)}function S(e){for(;e!==t.SENTINEL;){var n=C(e);if(e.maxEnd===n)return;e.maxEnd=n,e=e.parent}}function w(e,t,n,i){return e===n?t-i:e-n}t.IntervalTree=h,t.nodeAcceptEdit=f,t.recomputeMaxEnd=b,t.intervalCompare=w})),define(n[343],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return e.prototype.next=function(){if(this.right!==t.SENTINEL)return i(this.right);for(var e=this;e.parent!==t.SENTINEL&&e.parent.left!==e;)e=e.parent;return e.parent===t.SENTINEL?t.SENTINEL:e.parent},e.prototype.prev=function(){if(this.left!==t.SENTINEL)return o(this.left) +;for(var e=this;e.parent!==t.SENTINEL&&e.parent.right!==e;)e=e.parent;return e.parent===t.SENTINEL?t.SENTINEL:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();function i(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}function o(e){for(;e.right!==t.SENTINEL;)e=e.right;return e}function r(e){return e===t.SENTINEL?0:e.size_left+e.piece.length+r(e.right)}function s(e){return e===t.SENTINEL?0:e.lf_left+e.piece.lineFeedCnt+s(e.right)}function a(){t.SENTINEL.parent=t.SENTINEL}function l(e,n){var i=n.right;i.size_left+=n.size_left+(n.piece?n.piece.length:0),i.lf_left+=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),n.right=i.left,i.left!==t.SENTINEL&&(i.left.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n.parent.left===n?n.parent.left=i:n.parent.right=i,i.left=n,n.parent=i}function u(e,n){var i=n.left;n.left=i.right,i.right!==t.SENTINEL&&(i.right.parent=n),i.parent=n.parent,n.size_left-=i.size_left+(i.piece?i.piece.length:0), +n.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),n.parent===t.SENTINEL?e.root=i:n===n.parent.right?n.parent.right=i:n.parent.left=i,i.right=n,n.parent=i}function d(e,n,i,o){for(;n!==e.root&&n!==t.SENTINEL;)n.parent.left===n&&(n.parent.size_left+=i,n.parent.lf_left+=o),n=n.parent}function c(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=r((t=t.parent).left)-t.size_left,i=s(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}t.TreeNode=n,t.SENTINEL=new n(null,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,t.SENTINEL.color=0,t.leftest=i,t.righttest=o,t.calculateSize=r,t.calculateLF=s,t.resetSentinel=a,t.leftRotate=l,t.rightRotate=u,t.rbDelete=function(e,n){var o,h;if(o=n.left===t.SENTINEL?(h=n).right:n.right===t.SENTINEL?(h=n).left:(h=i(n.right)).right,h===e.root)return e.root=o,o.color=0,n.detach(),a(), +void(e.root.parent=t.SENTINEL);var p=1===h.color;if(h===h.parent.left?h.parent.left=o:h.parent.right=o,h===n?(o.parent=h.parent,c(e,o)):(h.parent===n?o.parent=h:o.parent=h.parent,c(e,o),h.left=n.left,h.right=n.right,h.parent=n.parent,h.color=n.color,n===e.root?e.root=h:n===n.parent.left?n.parent.left=h:n.parent.right=h,h.left!==t.SENTINEL&&(h.left.parent=h),h.right!==t.SENTINEL&&(h.right.parent=h),h.size_left=n.size_left,h.lf_left=n.lf_left,c(e,h)),n.detach(),o.parent.left===o){var f=r(o),g=s(o);if(f!==o.parent.size_left||g!==o.parent.lf_left){var m=f-o.parent.size_left,v=g-o.parent.lf_left;o.parent.size_left=f,o.parent.lf_left=g,d(e,o.parent,m,v)}}if(c(e,o.parent),p)a();else{for(var _;o!==e.root&&0===o.color;)o===o.parent.left?(1===(_=o.parent.right).color&&(_.color=0,o.parent.color=1,l(e,o.parent),_=o.parent.right),0===_.left.color&&0===_.right.color?(_.color=1,o=o.parent):(0===_.right.color&&(_.left.color=0,_.color=1,u(e,_),_=o.parent.right),_.color=o.parent.color,o.parent.color=0,_.right.color=0, +l(e,o.parent),o=e.root)):(1===(_=o.parent.left).color&&(_.color=0,o.parent.color=1,u(e,o.parent),_=o.parent.left),0===_.left.color&&0===_.right.color?(_.color=1,o=o.parent):(0===_.left.color&&(_.right.color=0,_.color=1,l(e,_),_=o.parent.left),_.color=o.parent.color,o.parent.color=0,_.left.color=0,u(e,o.parent),o=e.root));o.color=0,a()}},t.fixInsert=function(e,t){for(c(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&l(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,u(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&u(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,l(e,t.parent.parent))}e.root.color=0},t.updateTreeMetadata=d,t.recomputeTreeMetadata=c})),define(n[344],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{ +value:!0});var n=function(){this.changeType=1};t.ModelRawFlush=n;var i=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t};t.ModelRawLineChanged=i;var o=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t};t.ModelRawLinesDeleted=o;var r=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n};t.ModelRawLinesInserted=r;var s=function(){this.changeType=5};t.ModelRawEOLChanged=s;var a=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t=0;var t=null;try{t=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;var o=!this.isRegex&&!e +;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new u(t,this.wordSeparators?i.getMapForWordSeparators(this.wordSeparators):null,o?this.searchString:null)},e}();function l(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var i=e.charCodeAt(t);if(110===i||114===i||87===i||119===i)return!0}}return!1}t.SearchParams=a,t.isMultilineRegexSource=l;var u=function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n};function d(e,t,n){if(!n)return new s.FindMatch(e,null);for(var i=[],o=0,r=t.length;o>0) +;t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),h=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new f(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,o,s){var a,l,u=0;if(a=i?t+o+(u=i.findLineFeedCountBeforeOffset(o)):t+o,i){var d=i.findLineFeedCountBeforeOffset(o+s.length)-u;l=a+s.length+d}else l=a+s.length;var c=e.getPositionAt(a),h=e.getPositionAt(l);return new r.Range(c.lineNumber,c.column,h.lineNumber,h.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){var r,s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new c(a):null,u=[],h=0;for(n.reset(0);r=n.next(a);)if(u[h++]=d(this._getMultilineMatchRange(e,s,a,l,r.index,r[0]),r,i),h>=o)return u;return u},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){ +var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var u=t.startLineNumber+1;u=u))return o;return o}var _,y=new f(e.wordSeparators,e.regex);y.reset(0);do{if((_=y.next(t))&&(a[o++]=d(new r.Range(n,_.index+1+i,n,_.index+1+_[0].length+i),_,l),o>=u))return o}while(_);return o}, +e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,i){var s=new o.Position(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),u=e.getValueInRange(new r.Range(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),h="\r\n"===e.getEOL()?new c(u):null;n.reset(t.column-1);var p=n.next(u);return p?d(this._getMultilineMatchRange(e,a,u,h,p.index,p[0]),p,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.Position(1,1),n,i):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var l=1;l<=o;l++){var u=(r+l-1)%o,d=e.getLineContent(u+1),c=this._findFirstMatchInLine(n,d,u+1,1,i);if(c)return c}return null},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1) +;var s=e.next(t);return s?d(new r.Range(n,s.index+1,n,s.index+1+s[0].length),s,o):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,i){var s=this._doFindMatchesMultiline(e,new r.Range(1,1,t.lineNumber,t.column),n,i,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.Position(a,e.getLineMaxColumn(a)),n,i):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var l=1;l<=o;l++){var u=(o+r-l-1)%o,d=e.getLineContent(u+1),c=this._findLastMatchInLine(n,d,u+1,i);if(c)return c}return null},e._findLastMatchInLine=function(e,t,n,i){ +var o,s=null;for(e.reset(0);o=e.next(t);)s=d(new r.Range(n,o.index+1,n,o.index+1+o[0].length),o,i);return s},e}();function p(e,t,n,i,o){return function(e,t,n,i,o){if(0===i)return!0;var r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}(e,t,n,i,o)}t.TextModelSearch=h,t.isValidMatch=p;var f=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length +;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||p(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}();t.Searcher=f})),define(n[188],i([0,1,13,3,47,343,143]),(function(e,t,n,i,o,r,s){"use strict";function a(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}Object.defineProperty(t,"__esModule",{value:!0}),t.AverageBufferSize=65535,t.createUintArray=a;var l=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function u(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o126)&&(s=!1)}var h=new l(a(e),i,o,r,s);return e.length=0,h};var d=function(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o};t.Piece=d;var c=function(e,t){this.buffer=e,this.lineStarts=t};t.StringBuffer=c;var h=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s0){e[o].lineStarts||(e[o].lineStarts=u(e[o].buffer));var a=new d(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,a)}this._searchCache=new h(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var n=this,i=t.AverageBufferSize,o=i-Math.floor(i/3),r=2*o,s="",a=0,l=[] +;if(this.iterate(this.root,(function(t){var i=n.getNodeContent(t),d=i.length;if(a<=o||a+d0){var d=s.replace(/\r\n|\r|\n/g,e);l.push(new c(d,u(d)))}this.create(l,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==r.SENTINEL;)if(i.left!==r.SENTINEL&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,i=0,o=e;t!==r.SENTINEL;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){ +var a=o-this.getOffsetAt(i+1,1);return new n.Position(i+1,a+1)}return new n.Position(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===r.SENTINEL){a=o-e-this.getOffsetAt(i+1,1);return new n.Position(i+1,a+1)}t=t.right}return new n.Position(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)} +var s=e.node,a=this._buffers[s.piece.bufferIndex].buffer,l=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start),u=a.substring(l+e.remainder,l+s.piece.length);for(s=s.next();s!==r.SENTINEL;){var d=this._buffers[s.piece.bufferIndex].buffer,c=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(s===t.node){u+=d.substring(c,c+t.remainder);break}u+=d.substr(c,s.piece.length),s=s.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""), +this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}o=this._buffers[n.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,o,r,a,l,u,d,c,h){var p,f,g,m=this._buffers[e.piece.bufferIndex],v=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),_=this.offsetInBuffer(e.piece.bufferIndex,r),y=this.offsetInBuffer(e.piece.bufferIndex,a),C={line:0,column:0};t._wordSeparators?(f=m.buffer.substring(_,y),g=function(e){return e+_},t.reset(-1)):(f=m.buffer, +g=function(e){return e},t.reset(_));do{if(p=t.next(f)){if(g(p.index)>=y)return c;this.positionInBuffer(e,g(p.index)-v,C);var b=this.getLineFeedCnt(e.piece.bufferIndex,r,C),S=C.line===r.line?C.column-r.column+o:C.column+1,w=S+p[0].length;if(h[c++]=s.createFindMatch(new i.Range(n+b,S,n+b,w),p,u),g(p.index)+p[0].length>=y)return c;if(c>=d)return c}}while(p);return c},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,a=new s.Searcher(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===l)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var d=this.positionInBuffer(l.node,l.remainder),c=this.positionInBuffer(u.node,u.remainder);if(l.node===u.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,c,t,n,i,r,o),o;for(var h=e.startLineNumber,p=l.node;p!==u.node;){var f=this.getLineFeedCnt(p.piece.bufferIndex,d,p.piece.end);if(f>=1){ +var g=this._buffers[p.piece.bufferIndex].lineStarts,m=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start),v=g[d.line+f],_=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(p,a,h,_,d,this.positionInBuffer(p,v-m),t,n,i,r,o))>=i)return o;h+=f}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var C=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,a,C,e.endLineNumber,y,r,o,n,i),o}if((r=this._findMatchesInLine(t,a,this.getLineContent(h).substr(y),h,y,r,o,n,i))>=i)return o;h++,p=(l=this.nodeAt2(h,1)).node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){var b=h===e.startLineNumber?e.startColumn-1:0;C=this.getLineContent(h).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,a,C,e.endLineNumber,b,r,o,n,i),o}var S=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,a,h,S,d,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,r,a,l,u,d,c){var h,p=e.wordSeparators +;if(!d&&e.simpleSearch){for(var f=e.simpleSearch,g=f.length,m=n.length,v=-g;-1!==(v=n.indexOf(f,v+g));)if((!p||s.isValidMatch(p,n,m,v,g))&&(u[l++]=new o.FindMatch(new i.Range(r,v+1+a,r,v+1+g+a),null),l>=c))return l;return l}t.reset(0);do{if((h=t.next(n))&&(u[l++]=s.createFindMatch(new i.Range(r,h.index+1+a,r,h.index+1+h[0].length+a),h,d),l>=c))return l}while(h);return l},e.prototype.insert=function(e,n,i){if(void 0===i&&(i=!1),this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==r.SENTINEL){var o=this.nodeAt(e),s=o.node,a=o.remainder,l=o.nodeStartOffset,u=s.piece,c=u.bufferIndex,h=this.positionInBuffer(s,a);if(0===s.piece.bufferIndex&&u.end.line===this._lastChangeBufferPos.line&&u.end.column===this._lastChangeBufferPos.column&&l+u.length===e&&n.lengthe){ +var p=[],f=new d(u.bufferIndex,h,u.end,this.getLineFeedCnt(u.bufferIndex,h,u.end),this.offsetInBuffer(c,u.end)-this.offsetInBuffer(c,h));if(this.shouldCheckCRLF()&&this.endWithCR(n))if(10===this.nodeCharCodeAt(s,a)){var g={line:f.start.line+1,column:0};f=new d(f.bufferIndex,g,f.end,this.getLineFeedCnt(f.bufferIndex,g,f.end),f.length-1),n+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(n))if(13===this.nodeCharCodeAt(s,a-1)){var m=this.positionInBuffer(s,a-1);this.deleteNodeTail(s,m),n="\r"+n,0===s.piece.length&&p.push(s)}else this.deleteNodeTail(s,h);else this.deleteNodeTail(s,h);var v=this.createNewPieces(n);f.length>0&&this.rbInsertRight(s,f);for(var _=s,y=0;y=0;u--)l=this.rbInsertLeft(l,a[u]);this.validateCRLFWithPrevNode(l),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=d))break;a=u+1}return n?(n.line=u,n.column=s-c,null):{line:u,column:s-c}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;tt.AverageBufferSize){for(var n=[];e.length>t.AverageBufferSize;){var i=e.charCodeAt(t.AverageBufferSize-1),o=void 0;13===i||i>=55296&&i<=56319?(o=e.substring(0,t.AverageBufferSize-1), +e=e.substring(t.AverageBufferSize-1)):(o=e.substring(0,t.AverageBufferSize),e=e.substring(t.AverageBufferSize));var r=u(o);n.push(new d(this._buffers.length,{line:0,column:0},{line:r.length-1,column:o.length-r[r.length-1]},r.length-1,o.length)),this._buffers.push(new c(o,r))}var s=u(e);return n.push(new d(this._buffers.length,{line:0,column:0},{line:s.length-1,column:e.length-s[s.length-1]},s.length-1,e.length)),this._buffers.push(new c(e,s)),n}var a=this._buffers[0].buffer.length,l=u(e,!1),h=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},h=this._lastChangeBufferPos;for(var p=0;p=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){s=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1), +a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return d+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:d,nodeStartLineNumber:c-(e-1-n.lf_left)}),a.substring(l+s,l+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){s=this.getAccumulatedValue(n,e-n.lf_left-2),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=a.substring(l+s,l+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,d+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==r.SENTINEL;){a=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=a.substring(l,l+u-t)}l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=a.substr(l,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==r.SENTINEL;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length, +e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),u=l-i,c=a-o,h=n.length+c;e.piece=new d(n.bufferIndex,n.start,s,l,h),r.updateTreeMetadata(this,e,c,u)},e.prototype.deleteNodeHead=function(e,t){ +var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=a-i,u=o-this.offsetInBuffer(n.bufferIndex,s),c=n.length+u;e.piece=new d(n.bufferIndex,s,n.end,a,c),r.updateTreeMetadata(this,e,u,l)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,s=i.end,a=i.length,l=i.lineFeedCnt,u=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,u),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new d(i.bufferIndex,i.start,u,c,h),r.updateTreeMetadata(this,e,h-a,c-l);var p=new d(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),f=this.rbInsertRight(e,p);this.validateCRLFWithPrevNode(f)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t +;for(var o=u(t,!1),s=0;se)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o} +e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==r.SENTINEL;)if(n.left!==r.SENTINEL&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==r.SENTINEL;){if(n.piece.lineFeedCnt>0){s=this.getAccumulatedValue(n,0);var a=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,s),nodeStartOffset:a}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){ +if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===r.SENTINEL||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==r.SENTINEL&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){ +if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new d(e.piece.bufferIndex,e.piece.start,n,a,s),r.updateTreeMetadata(this,e,-1,-1),0===e.piece.length&&i.push(e);var l={line:t.piece.start.line+1,column:0},u=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new d(t.piece.bufferIndex,l,t.piece.end,c,u),r.updateTreeMetadata(this,t,-1,-1),0===t.piece.length&&i.push(t);var h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(var p=0;p0){v.sort((function(e,t){return t.lineNumber-e.lineNumber})),w=[];u=0;for(var E=v.length;u0&&v[u-1].lineNumber===y)){var L=v[u].oldContent,D=this.getLineContent(y) +;0!==D.length&&D!==L&&-1===n.firstNonWhitespaceIndex(D)&&w.push(y)}}}return new o.ApplyEditsResult(b,S,w)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,o=e[e.length-1].range,r=new i.Range(n.startLineNumber,n.startColumn,o.endLineNumber,o.endColumn),s=n.startLineNumber,a=n.startColumn,l=[],u=0,d=e.length;u0){var h=l.lines.length,p=l.lines[0],f=l.lines[h-1];c=1===h?new i.Range(u,d,u,d+p.length):new i.Range(u,d,u+h-1,f.length+1)}else c=new i.Range(u,d,u,d);n=c.endLineNumber,o=c.endColumn,t.push(c),r=l}return t},e._sortOpsAscending=function(e,t){var n=i.Range.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=i.Range.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}();t.PieceTreeTextBuffer=s})),define(n[346],i([0,1,5,188,345]),(function(e,t,n,i,o){"use strict" +;Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=i.createLineStarts(this._tmpLineStarts,e);this.chunks.push(new i.StringBuffer(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=n.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new r(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e) +},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=i.createLineStartsFast(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();t.PieceTreeTextBufferBuilder=s})),define(n[106],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n="(-?\\d*\\.\\d\\w*)|([^",i=0,o=t.USUAL_WORD_SEPARATORS;i=0||(n+="\\"+r)}return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),n=new RegExp(e.source,i)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,n,i){t.lastIndex=0 +;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(e,t,n,i){var o,r=e-1-i;for(t.lastIndex=0;o=t.exec(n);){var s=o.index||0;if(s>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+s,endColumn:i+1+t.lastIndex}}return null}(e,t,n,i):function(e,t,n,i){var o,r=e-1-i,s=n.lastIndexOf(" ",r-1)+1;for(t.lastIndex=s;o=t.exec(n);){var a=o.index||0;if(a<=r&&t.lastIndex>=r)return{word:o[0],startColumn:i+1+a,endColumn:i+1+t.lastIndex}}return null}(e,t,n,i);return t.lastIndex=0,r}})),define(n[347],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e}();t.FrankensteinMode=n})),define(n[89],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={})) +;var n=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;ts&&(s=u)}return s}if("string"==typeof t)return r?"*"===t?5:t===o?10:0:0;if(t){var d=t.language,c=t.pattern,h=t.scheme,p=t.hasAccessToAllModels;if(!r&&!p)return 0;s=0;if(h)if(h===i.scheme)s=10;else{if("*"!==h)return 0;s=5}if(d)if(d===o)s=10;else{if("*"!==d)return 0;s=Math.max(s,5)}if(c){if(c!==i.fsPath&&!n.match(c,i.fsPath))return 0;s=10}return s}return 0} +})),define(n[349],i([0,1,78]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;ot&&(t=d),a>n&&(n=a),(c=s[2])>n&&(n=c)}var l=new i(++n,++t,0);for(o=0,r=e.length;o=this._maxCharCode?0:this._states.get(e,t)},e}();t.StateMachine=o;var r=null;var s=null;var a=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);if(i>0){var a=t.charCodeAt(i-1),l=t.charCodeAt(r) +;(40===a&&41===l||91===a&&93===l||123===a&&125===l)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t,i){void 0===i&&(null===r&&(r=new o([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),i=r);for(var a=function(){if(null===s){s=new n.CharacterClassifier(0);for(var e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),l=[],u=1,d=t.getLineCount();u<=d;u++){for(var c=t.getLineContent(u),h=c.length,p=0,f=0,g=0,m=1,v=!1,_=!1,y=!1;p0&&e.getLanguageId(a-1)===r;)a--;return new n(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))};var n=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t, +this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=n,t.ignoreBracketsInToken=function(e){return 0!=(7&e)}})),define(n[350],i([0,1,89]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){if(t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new n.StandardAutoClosingPairConditional(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){ +return new n.StandardAutoClosingPairConditional({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var i=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new n.StandardAutoClosingPairConditional({open:i.open,close:i.close||""}))}this._autoCloseBefore="string"==typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore},e.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t",e}();t.CharacterPairSupport=i})),define(n[351],i([0,1]),(function(e,t){ +"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._indentationRules=e}return e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t},e}() +;t.IndentRulesSupport=n})),define(n[352],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,i,o){var r;if(e&&t&&(r=this.doNavigateValueSet(t,o)))return{range:e,value:r};if(n&&i&&(r=this.doNavigateValueSet(i,o)))return{range:n,value:r};return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),o=parseFloat(e);return isNaN(i)||isNaN(o)||i!==o?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){ +for(var i=null,o=0,r=e.length;null===i&&o=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n})),define(n[353],i([0,1,10,5,89]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t){var n=this;(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach((function(t){var i=e._createOpenBracketRegExp(t[0]),o=e._createCloseBracketRegExp(t[1]);i&&o&&n._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:o})})),this._regExpRules=t.onEnterRules||[]}return e.prototype.onEnter=function(e,t,n,i){if(e>=3)for(var r=0,s=this._regExpRules.length;r=2&&n.length>0&&i.length>0)for(r=0,s=this._brackets.length;r=2&&n.length>0)for(r=0,s=this._brackets.length;r0&&l.push({open:d,close:c})}return l}(t);this.brackets=n.map((function(t,i){return new o(e,i,t.open,t.close,function(e,t,n,i){var o=[];o=(o=o.concat(e)).concat(t) +;for(var r=0,u=o.length;r=0&&i.push(u)}for(var d=0,c=s.close;d=0&&i.push(h)}}}function a(e,t){return e.length-t.length}function l(e){if(e.length<=1)return e;for(var t=[],n=new Set,i=0,o=e;i=0;n--)t+=e.charAt(n);return t}(c=e)),h}),f=function(){function e(){} +return e._findPrevBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=n.length-(r.index||0),a=r[0].length,l=o+s;return new i.Range(t,l-a+1,t,l+1)},e.findPrevBracketInRange=function(e,t,n,i,o){var r=p(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i)},e.findNextBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=r.index||0,a=r[0].length;if(0===a)return null;var l=o+s;return new i.Range(t,l+1,t,l+1+a)},e.findNextBracketInRange=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}();t.BracketsUtils=f})),define(n[354],i([0,1,144,145]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._richEditBrackets=e}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets;t1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var r=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!r)return null;if(n<=1)return{indentation:"",action:null};var a=this.getPrecedingValidLine(t,n,r);if(a<0)return null;if(a<1)return{indentation:"",action:null};var l=t.getLineContent(a) +;if(r.shouldIncrease(l)||r.shouldIndentNextLine(l))return{indentation:o.getLeadingWhitespace(l),action:s.IndentAction.Indent,line:a};if(r.shouldDecrease(l))return{indentation:o.getLeadingWhitespace(l),action:null,line:a};if(1===a)return{indentation:o.getLeadingWhitespace(t.getLineContent(a)),action:null,line:a};var u=a-1,d=r.getIndentMetadata(t.getLineContent(u));if(!(3&d)&&4&d){for(var c=0,h=u-1;h>0;h--)if(!r.shouldIndentNextLine(t.getLineContent(h))){c=h;break}return{indentation:o.getLeadingWhitespace(t.getLineContent(c+1)),action:null,line:c+1}}if(i)return{indentation:o.getLeadingWhitespace(t.getLineContent(a)),action:null,line:a};for(h=a;h>0;h--){var p=t.getLineContent(h);if(r.shouldIncrease(p))return{indentation:o.getLeadingWhitespace(p),action:s.IndentAction.Indent,line:h};if(r.shouldIndentNextLine(p)){c=0;for(var f=h-1;f>0;f--)if(!r.shouldIndentNextLine(t.getLineContent(h))){c=f;break}return{indentation:o.getLeadingWhitespace(t.getLineContent(c+1)),action:null,line:c+1}}if(r.shouldDecrease(p))return{ +indentation:o.getLeadingWhitespace(p),action:null,line:h}}return{indentation:o.getLeadingWhitespace(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,r){if(e<4)return null;var a=this._getRichEditSupport(n);if(!a)return null;var l=this.getIndentRulesSupport(n);if(!l)return null;var u=this.getInheritIndentForLine(e,t,i),d=t.getLineContent(i);if(u){var c=u.line;if(void 0!==c){var h=a.onEnter(e,"",t.getLineContent(c),"");if(h){var p=o.getLeadingWhitespace(t.getLineContent(c));return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===s.IndentAction.Indent||h.indentAction===s.IndentAction.IndentOutdent?p=r.shiftIndent(p):h.indentAction===s.IndentAction.Outdent&&(p=r.unshiftIndent(p)),l.shouldDecrease(d)&&(p=r.unshiftIndent(p)),h.appendText&&(p+=h.appendText),o.getLeadingWhitespace(p)}} +return l.shouldDecrease(d)?u.action===s.IndentAction.Indent?u.indentation:r.unshiftIndent(u.indentation):u.action===s.IndentAction.Indent?r.shiftIndent(u.indentation):u.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var r,l,u=t.getLineTokens(n.startLineNumber),d=a.createScopedLineTokens(u,n.startColumn-1),c=d.getLineContent(),h=!1;(d.firstCharOffset>0&&u.getLanguageId(0)!==d.languageId?(h=!0,r=c.substr(0,n.startColumn-1-d.firstCharOffset)):r=u.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?l=c.substr(n.startColumn-1-d.firstCharOffset):l=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-d.firstCharOffset);var p=this.getIndentRulesSupport(d.languageId);if(!p)return null;var f=r,g=o.getLeadingWhitespace(r),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){ +return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?f:t.getLineContent(e)}},v=o.getLeadingWhitespace(u.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var y=h?v:g;return{beforeEnter:y,afterEnter:y}}var C=h?v:_.indentation;return _.action===s.IndentAction.Indent&&(C=i.shiftIndent(C)),p.shouldDecrease(l)&&(C=i.unshiftIndent(C)),{beforeEnter:h?v:g,afterEnter:C}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),a=this.getIndentRulesSupport(r.languageId);if(!a)return null;var l,u=r.getLineContent(),d=u.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?l=u.substr(n.startColumn-1-r.firstCharOffset):l=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);if(!a.shouldDecrease(d+l)&&a.shouldDecrease(d+i+l)){var c=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!c)return null +;var h=c.indentation;return c.action!==s.IndentAction.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,a=i.getLineContent(),l=a.substr(0,n.startColumn-1-i.firstCharOffset);n.isEmpty()?r=a.substr(n.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);var u="";if(n.startLineNumber>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(t,n.startLineNumber-1);d.languageId===i.languageId&&(u=d.getLineContent())}var c=o.onEnter(e,u,l,r);if(!c)return null;var h=c.indentAction,p=c.appendText,f=c.removeText||0 +;p||(p=h===s.IndentAction.Indent||h===s.IndentAction.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:h,appendText:p,removeText:f,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),r=o.getLeadingWhitespace(i);return r.length>n-1&&(r=r.substring(0,n-1)),r},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return a.createScopedLineTokens(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}();t.LanguageConfigurationRegistryImpl=g,t.LanguageConfigurationRegistry=new g})),define(n[355],i([0,1,27]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o};function o(e){if(!e||!Array.isArray(e))return[] +;for(var t=[],n=0,o=0,r=e.length;o=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var s=new a,u=0,d=t;u>>0,this._cache.set(t,n)} +return(n|e<<0)>>>0},e}();t.TokenTheme=l;var u=/\b(comment|string|regex|regexp)\b/;function d(e){var t=e.match(u);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function c(e,t){return et?1:0}t.toStandardTokenType=d,t.strcmp=c;var h=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}();t.ThemeTrieElementRule=h;var p=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule +;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var l=this._children.get(r);void 0===l&&(l=new e(this._mainRule.clone()),this._children.set(r,l)),l.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}();t.ThemeTrieElement=p,t.generateTokensCSSForColorMap=function(e){for(var t=[],n=1,i=e.length;n2?this._colorMap[2]:null},e}();t.TokenizationRegistryImpl=s})), +/*! +Copyright (c) 2014 Taylor Hakes +Copyright (c) 2014 Forbes Lindesay + */ +p=function(){"use strict";function e(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}var t=setTimeout;function n(){}function i(e){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void s(t.promise,e)}r(t.promise,i)}else(1===e._state?r:s)(t.promise,e._value)}))):e._deferreds.push(t)}function r(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void a(e) +;if("function"==typeof n)return void u((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,a(e)}catch(t){s(e,t)}var o,r}function s(e,t){e._state=2,e._value=t,a(e)}function a(e){2===e._state&&0===e._deferreds.length&&i._immediateFn((function(){e._handled||i._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;ti&&(p=i-f);var g=u.color,m=this._color2Id[g];m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var v=new n(p-f,p+f,m);u.setColorZone(v),s.push(v)}return this._colorZonesInvalid=!1,s.sort(n.compare),s},e}();t.OverviewZoneManager=o})),define(n[90],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height} +return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}();t.RestrictedRenderingContext=n;var i=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._viewLines=i,o}return r(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){return this._viewLines.visibleRangeForPosition(e)},t}(n);t.RenderingContext=i;var o=function(e,t,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n};t.LineVisibleRanges=o;var s=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}();t.HorizontalRange=s;var a=function(e,t){this.outsideRenderedLine=e, +this.left=Math.round(t)};t.HorizontalPosition=a;var l=function(e,t){this.outsideRenderedLine=e,this.ranges=t};t.VisibleRanges=l})),define(n[357],i([0,1,90]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),o=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new n.HorizontalRange(e[0].left,e[0].width)];e.sort(i.compare);for(var t=[],o=0,r=e[0].left,s=e[0].width,a=1,l=e.length;a=d?s=Math.max(s,d+c-r):(t[o++]=new n.HorizontalRange(r,s),r=d,s=c)}return t[o++]=new n.HorizontalRange(r,s),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],o=0,r=e.length;oa)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=1073741824);var l=e.children[t].firstChild,u=e.children[i].firstChild;if(l&&u||(!l&&0===n&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!u&&0===o&&i>0&&(u=e.children[i-1].firstChild,o=1073741824)),!l||!u)return null;n=Math.min(l.textContent.length,Math.max(0,n)),o=Math.min(u.textContent.length,Math.max(0,o));var d=this._readClientRects(l,n,u,o,s);return this._createHorizontalRangesFromClientRects(d,r)},e}();t.RangeUtil=o})),define(n[358],i([0,1]),(function(e,t){"use strict" +;Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,i){this.configuration=e,this.theme=t,this.model=n,this.viewLayout=n.viewLayout,this.privateViewEventBus=i}return e.prototype.addEventHandler=function(e){this.privateViewEventBus.addEventHandler(e)},e.prototype.removeEventHandler=function(e){this.privateViewEventBus.removeEventHandler(e)},e}();t.ViewContext=n})),define(n[359],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t0&&this._emit(e)}},t.prototype._emit=function(e){ +for(var t=this._listeners.slice(0),n=0,i=t.length;nn)&&(!d.isEmpty()||0!==u.type&&3!==u.type)){var c=d.startLineNumber===n?d.startColumn:i,h=d.endLineNumber===n?d.endColumn:o;r[s++]=new e(c,h,u.inlineClassName,u.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.LineDecoration=i;var o=function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n};t.DecorationSegment=o;var r=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),s=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var i=[],o=new r,s=0,a=0,l=t.length;a1){var p=e.charCodeAt(d-2);n.isHighSurrogate(p)&&d--}if(c>1){p=e.charCodeAt(c-2);n.isHighSurrogate(p)&&c--}var f=d-1,g=c-2;s=o.consumeLowerThan(f,s,i),0===o.count&&(s=f),o.insert(g,h)}return o.consumeLowerThan(1073741824,s,i),i},e}();t.LineDecorationsNormalizer=s})), +define(n[360],i([0,1,5]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return e.prototype.insert=function(e){this._hasPending=!0,this._inserts.push(e)},e.prototype.change=function(e){this._hasPending=!0,this._changes.push(e)},e.prototype.remove=function(e){this._hasPending=!0,this._removes.push(e)},e.prototype.mustCommit=function(){return this._hasPending},e.prototype.commit=function(e){if(this._hasPending){var t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}},e}(),o=function(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0};t.EditorWhitespace=o;var r=function(){function e(t,o){this._instanceId=n.singleLetterHash(++e.INSTANCE_COUNT),this._pendingChanges=new i,this._lastWhitespaceId=0,this._arr=[], +this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=o}return e.findInsertionIndex=function(e,t,n){for(var i=0,o=e.length;i>>1;t===e[r].afterLineNumber?n0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){ +for(var i=0,o=e;it&&(this._arr[n].afterLineNumber-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){if(this._checkPendingChanges(), +-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;tthis.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this.getWhitespacesCount();-1===l?(l=u,i=a+1,n=0):(i=0|this.getAfterLineNumberForWhitespaceIndex(l),n=0|this.getHeightForWhitespaceIndex(l));var d=s,c=d,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),c-=h=Math.floor(h/o)*o) +;for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){(d<=f&&ff)&&(g=m)}for(d+=o,p[m-r]=c,c+=o;i===m;)c+=n,d+=n,++l>=u?i=a+1:(i=0|this.getAfterLineNumberForWhitespaceIndex(l),n=0|this.getHeightForWhitespaceIndex(l));if(d>=t){a=m;break}}-1===g&&(g=a);var v=0|this.getVerticalOffsetForLineNumber(a),_=r,y=a;return _t&&y--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:_,completelyVisibleEndLineNumber:y}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){this._checkPendingChanges(),e|=0;var t=this.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this.getWhitespacesAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){this._checkPendingChanges(),e|=0;var t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=o+this.getHeightForWhitespaceIndex(i))t=i+1;else{if(e>=o)return i;n=i}}return t},e.prototype.getWhitespaceAtVerticalOffset=function(e){this._checkPendingChanges(),e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this.getIdForWhitespaceIndex(r), +afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._checkPendingChanges(),this._arr.slice(0)},e.prototype.getWhitespacesCount=function(){return this._checkPendingChanges(),this._arr.length},e.prototype.getIdForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber},e.prototype.getHeightForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height},e.INSTANCE_COUNT=0,e}();t.LinesLayout=r})),define(n[107],i([0,1,5,141,147]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.endIndex=e,this.type=t},s=function(){function e(e,t){this.startOffset=e,this.endOffset=t}return e.prototype.equals=function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset},e}() +;t.LineRange=s;var a=function(){function e(e,t,n,i,o,r,s,a,l,u,d,c,h,p,f,g){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=l,this.tabSize=u,this.spaceWidth=d,this.stopRenderingLineAfter=c,this.renderWhitespace="all"===h?3:"boundary"===h?1:"selection"===h?2:0,this.renderControlCharacters=p,this.fontLigatures=f,this.selectionsOnLine=g&&g.sort((function(e,t){return e.startOffset>>16},e.getCharIndex=function(e){return(65535&e)>>>0}, +e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1>>1,l=this._data[a];if(l===o)return a;l>o?s=a:r=a}if(r===s)return r;var u=this._data[r],d=this._data[s];if(u===o)return r;if(d===o)return s;var c=e.getPartIndex(u);return i-e.getCharIndex(u)<=(c!==e.getPartIndex(d)?n:e.getCharIndex(d))-i?r:s},e}();t.CharacterMapping=l;var u=function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n};function d(e,t){if(0===e.lineContent.length){var i=0,s=" ";if(e.lineDecorations.length>0){for(var a=[],d=0,c=e.lineDecorations.length;d')}return t.appendASCIIString(s),new u(new l(0,0),!1,i)}return function(e,t){var i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,d=e.isOverflowing,c=e.parts,h=e.tabSize,p=e.containsRTL,f=e.spaceWidth,g=e.renderWhitespace,m=e.renderControlCharacters,v=new l(a+1,c.length),_=0,y=0,C=0,b=0,S=0;t.appendASCIIString("");for(var w=0,E=c.length;w=0;if(C=0,t.appendASCIIString('0&&(!o||R>1?t.write1(8594):t.write1(65515),R--);R>0;)t.write1(160),R--;else t.write1(183);C++}b=I}else{I=0;for(p&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);_0;)t.write1(160),I++,R--;break;case 32:t.write1(160),I++;break;case 60:t.appendASCIIString("<"),I++;break;case 62:t.appendASCIIString(">"),I++;break;case 38:t.appendASCIIString("&"),I++;break;case 0:t.appendASCIIString("�"),I++;break;case 65279:case 8232:t.write1(65533),I++;break;default:n.isFullWidthCharacter(T)&&y++,m&&T<32?(t.write1(9216+T),I++):(t.write1(T),I++)}C++}b=I}t.appendASCIIString("")}v.setPartData(a,c.length-1,C,S),d&&t.appendASCIIString("");return t.appendASCIIString(""),new u(v,p,r)}(function(e){var t,i,s=e.useMonospaceOptimizations,a=e.lineContent +;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new r(t,""));for(var s=0,a=e.getCount();s=n){i[o++]=new r(n,u);break}i[o++]=new r(l,u)}}return i}(e.lineTokens,e.fauxIndentLength,i);(3===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine)&&(l=function(e,t,i,o,s,a,l,u,d){var c,h=[],p=0,f=0,g=o[f].type,m=o[f].endIndex,v=o.length,_=n.firstNonWhitespaceIndex(e);-1===_?(_=t,c=t):c=n.lastNonWhitespaceIndex(e);for(var y=0,C=0;C=w.endOffset&&(S++,w=u&&u[S]);var L=void 0;if(C<_||C>c)L=!0;else if(9===E)L=!0;else if(32===E)if(d)if(b)L=!0;else{var D=C+1C), +b?(!L||!l&&y>=a)&&(h[p++]=new r(C,"vs-whitespace"),y%=a):(C===m||L&&C>s)&&(h[p++]=new r(C,g),y%=a),9===E?y=a:n.isFullWidthCharacter(E)?y+=2:y++,b=L,C===m&&++f0?e.charCodeAt(t-1):0,I=t>1?e.charCodeAt(t-2):0;32===x&&32!==I&&9!==I||(N=!0)}else N=!0;return h[p++]=new r(t,N?"vs-whitespace":g),h}(a,i,e.continuesWithWrappedLine,l,e.fauxIndentLength,e.tabSize,s,e.selectionsOnLine,1===e.renderWhitespace));var u=0;if(e.lineDecorations.length>0){for(var d=0,c=e.lineDecorations.length;dc&&(c=v.startOffset,u[d++]=new r(c,m)),!(v.endOffset+1<=g)){c=g,u[d++]=new r(c,m+" "+v.className);break}c=v.endOffset+1, +u[d++]=new r(c,m+" "+v.className),l++}g>c&&(c=g,u[d++]=new r(c,m))}var _=n[n.length-1].endIndex;if(l=50&&(o[s++]=new r(c+1,d),h=c+1,c=-1);h!==u&&(o[s++]=new r(u,d))}else o[s++]=f;i=u}else for(a=0,l=t.length;a50){d=f.type;var m=Math.ceil(g/50);for(p=1;p=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;var r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){ +return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,o=0,r=0,s=0;t<=n;)if(o=t+(n-t)/2|0,e<(s=(r=this.prefixSum[o])-this.values[o]))n=o-1;else{if(!(e>=r))break;t=o+1}return new i(o,e-s)},e}();t.PrefixSumComputer=o;var r=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new o(e),this._bustCache()}return e.prototype._bustCache=function(){ +this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=i._lines.length?o.FIN:(n=i._lines[r],a=i._wordenize(n,e),s=0,r+=1,l())};return{next:l}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],i=[],o=0,r=this._wordenize(n,t);othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(p.MirrorTextModel),C=function(){function t(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}return t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t}, +t.prototype.acceptNewModel=function(e){this._models[e.url]=new y(a.URI.parse(e.url),e.lines,e.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){this._models[e]&&this._models[e].onEvents(t)},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t.prototype.computeDiff=function(e,t,n,i){return d(this,void 0,void 0,(function(){var o,r,s,a,l,u,d;return c(this,(function(c){return o=this._getModel(e),r=this._getModel(t),o&&r?(s=o.getLinesContent(),a=r.getLinesContent(),l=new h.DiffComputer(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}),u=l.computeDiff(),d=!(u.changes.length>0)&&this._modelsAreIdentical(o,r),[2,{quitEarly:u.quitEarly,identical:d,changes:u.changes}]):[2,null]}))}))},t.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var i=1;i<=n;i++){if(e.getLineContent(i)!==t.getLineContent(i))return!1}return!0}, +t.prototype.computeMoreMinimalEdits=function(e,o){return d(this,void 0,void 0,(function(){var r,s,a,l,d,h,p,f,g,m,v,_,y,C,b,S,w,E;return c(this,(function(c){if(!(r=this._getModel(e)))return[2,o];for(s=[],a=void 0,o=n.mergeSort(o,(function(e,t){return e.range&&t.range?u.Range.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)})),l=0,d=o;lt._diffLimit)s.push({range:p,text:f});else for(v=i.stringDiff(m,f,!1),_=r.offsetAt(u.Range.lift(p).getStartPosition()),y=0,C=v;y=i,d=a,c=o.viewportHeight-a>=i,h=e.left,p=t.left;return h+n>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-n), +p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),h=22,C=g+o<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;m+i+20>_&&(m-=s=m-(_-i-20),c-=s);v+i+20>_&&(v-=s=v-(_-i-20),h-=s);m<0&&(m-=s=m,c-=s);v<0&&(v-=s=v,h-=s);return this._fixedOverflowWidgets&&(u=f,d=g,c=m,h=v),{fitsAbove:y,aboveTop:Math.max(u,22),aboveLeft:c,fitsBelow:C,belowTop:d,belowLeft:h}}, +e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new s(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewPosition)return[null,null];var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return[null,null];var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop,i=new s(n,t.left),o=this._viewPosition.lineNumber,r=t.left;if(this._viewRange){var a=e.linesVisibleRangesForRange(this._viewRange,!1);if(a&&a.length>0)for(var l=a.length-1;l>=0;l--){var u=a[l];if(u.lineNumber>=o){u.lineNumber>o&&(o=u.lineNumber,r=1073741824);for(var d=0,c=u.ranges.length;de.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){ +this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}()})),define(n[365],i([0,1,81,3,90,284]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(47),n._typicalHalfwidthCharacterWidth=i.get(32).typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return r(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this), +this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(47),this._typicalHalfwidthCharacterWidth=t.get(32).typicalHalfwidthCharacterWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],o=0,r=0,s=t.length;rt.options.zIndex)return 1;var n=e.options.className,o=t.options.className +;return no?1:i.Range.compareRangesUsingStarts(e.range,t.range)}));for(var l=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,d=[],c=l;c<=u;c++){d[c-l]=""}this._renderWholeLineDecorations(e,n,d),this._renderNormalDecorations(e,n,d),this._renderResult=d},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s
    ',d=Math.max(l.range.startLineNumber,o),c=Math.min(l.range.endLineNumber,r),h=d;h<=c;h++){n[h-o]+=u}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var o=String(this._lineHeight),r=e.visibleRange.startLineNumber,s=null,a=!1,l=null,u=0,d=t.length;u';a[h]+=v}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e +;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(n.DynamicViewOverlay);t.DecorationsOverlay=s})),define(n[149],i([0,1,81,285]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)};t.DecorationToRender=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[]}if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var l=a-t,u=i[l];0===u.length?s[l]="":s[l]='
    =this._renderResult.length?"":this._renderResult[n]},t}(o);t.GlyphMarginOverlay=s})),define(n[366],i([0,1,149,289]),(function(e,t,n){"use strict" +;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options.get(103);return n._decorationsLeft=i.decorationsLeft,n._decorationsWidth=i.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return r(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(103);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0}, +t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=0,s=t.length;r
    ',r=[],s=t;s<=n;s++){for(var a=s-t,l=i[a],u="",d=0,c=l.length;d';o[s]=l}this._renderResult=o}, +t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(n.DedupOverlay);t.MarginViewLineDecorationsOverlay=i})),define(n[368],i([0,1,28,36,292]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var o=e.call(this,t)||this,r=o._context.configuration.options.get(103);return o._widgets={},o._verticalScrollbarWidth=r.verticalScrollbarWidth,o._minimapWidth=r.minimapWidth,o._horizontalScrollbarHeight=r.horizontalScrollbarHeight,o._editorHeight=r.height,o._editorWidth=r.width,o._domNode=n.createFastDomNode(document.createElement("div")),i.PartFingerprints.write(o._domNode,4),o._domNode.setClassName("overlayWidgets"),o}return r(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(103) +;return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0},t.prototype.addWidget=function(e){var t=n.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){ +var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,l=t;a=c?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=c,s=h)}e.fillRect(0,r,i,s-r)},t}(o.ViewEventHandler);t.OverviewRuler=s})),define(n[370],i([0,1,28,10,36,13]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){throw new Error("Invalid change accessor")},l=function(e){function t(t){var i=e.call(this,t)||this,o=i._context.configuration.options,r=o.get(103);return i._lineHeight=o.get(47),i._contentWidth=r.contentWidth,i._contentLeft=r.contentLeft,i.domNode=n.createFastDomNode(document.createElement("div")), +i.domNode.setClassName("view-zones"),i.domNode.setPosition("absolute"),i.domNode.setAttribute("role","presentation"),i.domNode.setAttribute("aria-hidden","true"),i.marginDomNode=n.createFastDomNode(document.createElement("div")),i.marginDomNode.setClassName("margin-view-zones"),i.marginDomNode.setPosition("absolute"),i.marginDomNode.setAttribute("role","presentation"),i.marginDomNode.setAttribute("aria-hidden","true"),i._zones={},i}return r(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=this,t=this._context.viewLayout.getWhitespaces(),n=new Map,i=0,o=t;i=t?0:n.horizontalScrollbarSize},t.prototype._getTotalHeight=function(e,t,n){var i=this._configuration.options,o=this._linesLayout.getLinesTotalHeight();return i.get(76)?o+=t-i.get(47):o+=this._getHorizontalScrollbarHeight(e,n),Math.max(t,o)},t.prototype._updateHeight=function(){var e=this.scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.scrollWidth,o=this._getTotalHeight(t,n,i);this.scrollable.setScrollDimensions({scrollHeight:o})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition() +;return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){var n=this._configuration.options;if(!n.get(104).isViewportWrapping){var i=n.get(75)*n.get(32).typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,t,o)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}}, +t.prototype.changeWhitespace=function(e){return this._linesLayout.changeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport() +;return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t +}(n.Disposable);t.ViewLayout=a})),define(n[372],i([0,1,13,3,69]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){ +this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,r=this._decorationsCache[t];if(!r){var s=e.range,a=e.options,l=void 0;if(a.isWholeLine){var u=this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.startLineNumber,1)),d=this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)));l=new i.Range(u.lineNumber,u.column,d.lineNumber,d.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(s);r=new o.ViewModelDecoration(l,a),this._decorationsCache[t]=r}return r},e.prototype.getDecorationsViewportData=function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}, +e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.options.get(65)),n=e.startLineNumber,r=e.endLineNumber,s=[],a=0,l=[],u=n;u<=r;u++)l[u-n]=[];for(var d=0,c=t.length;de.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;ne.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,r,s){var a,l=t.startLineNumber,u=t.startColumn,d=t.endLineNumber,c=t.endColumn,h=r.getLineContent(l),p=r.getLineContent(d),f=h.lastIndexOf(n,u-1+n.length),g=p.indexOf(i,c-1-i.length);if(-1!==f&&-1!==g)if(l===d){h.substring(f+n.length,g).indexOf(i)>=0&&(f=-1,g=-1)}else{var m=h.substring(f+n.length),v=p.substring(0,g);(m.indexOf(i)>=0||v.indexOf(i)>=0)&&(f=-1,g=-1)}-1!==f&&-1!==g?(f+n.length0&&32===p.charCodeAt(g-1)&&(i=" "+i,g-=1), +a=e._createRemoveBlockCommentOperations(new o.Range(l,f+n.length+1,d,g+1),n,i)):(a=e._createAddBlockCommentOperations(t,n,i),this._usedEndToken=1===a.length?i:null);for(var _=0,y=a;_a?r-1:r}},e}();t.LineCommentCommand=u})),define(n[376],i([0,1,21,3]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}return e.prototype.getEditOperations=function(e,t){var o=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new i.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),o), +!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new n.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new n.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumbert&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,r=!0),void 0!==n&&(o.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(i)},t.prototype.change=function(e,t,n){ +void 0===n&&(n=!0);var i={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},r=!1,s=this.isRegex,a=this.wholeWord,l=this.matchCase,u=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,i.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,i.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,i.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,i.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase), +void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&(o.Range.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,i.searchScope=!0,r=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(r=!0,i.isRegex=!0),a!==this.wholeWord&&(r=!0,i.wholeWord=!0),l!==this.matchCase&&(r=!0,i.matchCase=!0),u!==this.preserveCase&&(r=!0,i.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(i)},t}(i.Disposable);t.FindReplaceState=a})),define(n[378],i([0,1,3]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null} +return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var i=[],o=0;o0;){if(e=i)break;if(36===(u=e.charCodeAt(n))){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===u||38===u){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=u&&u<=57){var s=u-48;if(n+1=i)break;var u;switch(u=e.charCodeAt(n)){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}})),define(n[150],i([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_FOLDING_REGIONS=65535,t.MAX_LINE_NUMBER=16777215;var n=function(){function e(e,n,i){ +if(e.length!==n.length||e.length>t.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=n,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var n=[],i=function(t,i){var o=n[n.length-1];return e.getStartLineNumber(o)<=t&&e.getEndLineNumber(o)>=i},o=0,r=this._startIndexes.length;ot.MAX_LINE_NUMBER||a>t.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+t.MAX_LINE_NUMBER);for(;n.length>0&&!i(s,a);)n.pop();var l=n.length>0?n[n.length-1]:-1;n.push(o),this._startIndexes[o]=s+((255&l)<<24),this._endIndexes[o]=a+((65280&l)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){ +return this._startIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,n=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return n===t.MAX_FOLDING_REGIONS?-1:n},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}();t.FoldingRegion=i})),define(n[380],i([0,1,4,150]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._updateEventEmitter=new n.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new i.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel}, +enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var n={};this._decorationProvider.changeDecorations((function(i){for(var o=0,r=e;o=c))break;o(a,d===c),a++}}l=s()}for(;a0)return e}, +e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n=0;){var r=this._regions.toRegion(i);t&&!t(r,o)||n.push(r),o++,i=r.parentIndex}return n},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){var n=[],i=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length)for(var r=[],s=i,a=this._regions.length;s0&&!l.containedBy(r[r.length-1]);)r.pop();r.push(l),t(l,r.length)&&n.push(l) +}else for(s=i,a=this._regions.length;s1){var s=e.getRegionsInside(o,(function(e,n){return e.isCollapsed!==r&&n0)for(var r=0,s=i;r1)){var u=e.getRegionsInside(l,(function(e,i){return e.isCollapsed!==t&&i=0;s--)if(n!==o.isCollapsed(s)){var a=o.getStartLineNumber(s);t.test(i.getLineContent(a))&&r.push(o.toRegion(s))}e.toggleCollapseState(r)},t.setCollapseStateForType=function(e,t,n){for(var i=e.regions,o=[],r=i.length-1;r>=0;r--)n!==i.isCollapsed(r)&&t===i.getType(r)&&o.push(i.toRegion(r));e.toggleCollapseState(o)}})),define(n[381],i([0,1,4,3,19]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){var t=this;this._updateEventEmitter=new n.Emitter,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){ +return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],n=0,o=0,r=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;n0},e.prototype.isHidden=function(e){return null!==s(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,n=!1,i=this._foldingModel.textModel,o=null,r=function(e){return o&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,o)||(o=s(t._hiddenRanges,e)),o?o.startLineNumber-1:null},a=0,l=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function s(e,t){var n=o.findFirstInSorted(e,(function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}t.HiddenRangeModel=r})),define(n[193],i([0,1,10,150]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=5e3,r={};t.ID_SYNTAX_PROVIDER="syntax";var s=function(){function e(e,n,i){void 0===i&&(i=o),this.editorModel=e,this.providers=n,this.limit=i,this.id=t.ID_SYNTAX_PROVIDER}return e.prototype.compute=function(e){var t=this;return function(e,t,i){var o=null,s=e.map((function(e,s){return Promise.resolve(e.provideFoldingRanges(t,r,i)).then((function(e){if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);for(var n=t.getLineCount(),r=0,a=e;r0&&l.end>l.start&&l.end<=n&&o.push({start:l.start,end:l.end,rank:s,kind:l.kind})}}}),n.onUnexpectedExternalError)}));return Promise.all(s).then((function(e){return o}))}(this.providers,this.editorModel,e).then((function(e){return e?l(e,t.limit):null}))},e.prototype.dispose=function(){},e}();t.SyntaxRangeProvider=s;var a=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,n,o){if(!(e>i.MAX_LINE_NUMBER||t>i.MAX_LINE_NUMBER)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=o,this._types[r]=n,this._length++,o<30&&(this._nestingLevelCounts[o]=(this._nestingLevelCounts[o]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){r=n;break}o+=s}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var a=[],l=(n=0,0);no.start)if(u.end<=o.end)r.push(o),o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length);else{if(u.start>o.end){do{o=r.pop()}while(o&&u.start>o.end);o&&r.push(o),o=u}i.add(u.start,u.end,u.kind&&u.kind.value,r.length)}}else o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length)} +return i.toIndentRanges()}t.RangesCollector=a,t.sanitizeRanges=l})),define(n[382],i([0,1,193]),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID_INIT_PROVIDER="init";var i=function(){function e(e,n,i,o){if(this.editorModel=e,this.id=t.ID_INIT_PROVIDER,n.length){this.decorationIds=e.deltaDecorations([],n.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:1}}}))),this.timeout=setTimeout(i,o)}}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var i=0,o=this.decorationIds;i=r)return null;for(var s=[],a=i;a<=r;a++)s.push(e.getLineContent(a));var l=s.slice(0);return l.sort(o.getCollator().compare),!0===n&&(l=l.reverse()),{startLineNumber:i,endLineNumber:r,before:s,after:l}}t.SortLinesCommand=o})),define(n[198],i([0,1,13,3,75]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.provideSelectionRanges=function(t,n){return d(this,void 0,void 0,(function(){var i,o,r,s,a;return c(this,(function(l){switch(l.label){case 0:i=[],o=function(n){var o,r;return c(this,(function(s){switch(s.label){case 0:return o=[],i.push(o),r=new Map,[4,new Promise((function(i){return e._bracketsRightYield(i,0,t,n,r) +}))];case 1:return s.sent(),[4,new Promise((function(i){return e._bracketsLeftYield(i,0,t,n,r,o)}))];case 2:return s.sent(),[2]}}))},r=0,s=n,l.label=1;case 1:return r=e._maxRounds){t();break}if(!r){t();break}var u=i.findNextBracket(r);if(!u){t();break}if(Date.now()-l>e._maxDuration){setTimeout((function(){return e._bracketsRightYield(t,n+1,i,r,s)}));break}var d=u.close[0];if(u.isOpen){var c=a.has(d)?a.get(d):0;a.set(d,c+1)}else{c=a.has(d)?a.get(d):0;if(c-=1,a.set(d,Math.max(0,c)),c<0){var h=s.get(d);h||(h=new o.LinkedList,s.set(d,h)),h.push(u.range)}}r=u.range.getEndPosition()}},e._bracketsLeftYield=function(t,n,o,r,s,a){for(var l=new Map,u=Date.now();;){if(n>=e._maxRounds&&0===s.size){t();break}if(!r){t();break}var d=o.findPrevBracket(r);if(!d){t();break}if(Date.now()-u>e._maxDuration){setTimeout((function(){ +return e._bracketsLeftYield(t,n+1,o,r,s,a)}));break}var c=d.close[0];if(d.isOpen){m=l.has(c)?l.get(c):0;if(m-=1,l.set(c,Math.max(0,m)),m<0){var h=s.get(c);if(h){var p=h.shift();0===h.size&&s.delete(c);var f=i.Range.fromPositions(d.range.getEndPosition(),p.getStartPosition()),g=i.Range.fromPositions(d.range.getStartPosition(),p.getEndPosition());a.push({range:f}),a.push({range:g}),e._addBracketLeading(o,g,a)}}}else{var m=l.has(c)?l.get(c):0;l.set(c,m+1)}r=d.range.getStartPosition()}},e._addBracketLeading=function(e,t,o){if(t.startLineNumber!==t.endLineNumber){var r=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(r);0!==s&&s!==t.startColumn&&(o.push({range:i.Range.fromPositions(new n.Position(r,s),t.getEndPosition())}),o.push({range:i.Range.fromPositions(new n.Position(r,1),t.getEndPosition())}));var a=r-1;if(a>0){var l=e.getLineFirstNonWhitespaceColumn(a);l===t.startColumn&&l!==e.getLineLastNonWhitespaceColumn(a)&&(o.push({range:i.Range.fromPositions(new n.Position(a,l),t.getEndPosition())}),o.push({ +range:i.Range.fromPositions(new n.Position(a,1),t.getEndPosition())}))}}},e._maxDuration=30,e._maxRounds=2,e}();t.BracketSelectionRangeProvider=r})),define(n[387],i([0,1,3,5]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.provideSelectionRanges=function(e,t){for(var n=[],i=0,o=t;i=0;u--){if(95===(h=s.charCodeAt(u))||45===h)break;if(i.isLowerAsciiLetter(h)&&i.isUpperAsciiLetter(c))break;c=h}for(u+=1;d0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new n.Range(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})},e}();t.WordSelectionRangeProvider=o}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e, +this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,n=this.pos,i=0,o=this.value.charCodeAt(n);if("number"==typeof(t=e._table[o]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(n+i)}while(e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}if(e.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(n+ ++i)}while(e.isVariableCharacter(o)||e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(n+i)}while(!isNaN(o)&&void 0===e._table[o]&&!e.isDigitCharacter(o)&&!e.isVariableCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}},e._table=((n={})[36]=0,n[58]=1,n[44]=2,n[123]=3,n[125]=4,n[92]=5,n[47]=6,n[124]=7,n[43]=11,n[45]=12,n[63]=13,n),e}();t.Scanner=i;var o=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){ +return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),o=n.children.slice(0);o.splice.apply(o,a([i,1],t)),n._children=o,function e(t,n){for(var i=0,o=t;it.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof d?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(l);t.Placeholder=u;var d=function(e){function t(){ +var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return r(t,e),t.prototype.appendChild=function(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(o);t.Choice=d;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.regexp=new RegExp(""),t}return r(t,e),t.prototype.resolve=function(e){var t=this,n=!1,i=e.replace(this.regexp,(function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!n&&this._children.some((function(e){return e instanceof h&&Boolean(e.elseValue)}))&&(i=this._replace([])),i},t.prototype._replace=function(e){for(var t="",n=0,i=this._children;n0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}t.Variable=p;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk((function(n){return n instanceof u&&(t.push(n),e=!e||e.index0?o.set(e.index,e.children):r.push(e)),!0}));for(var a=0,l=r;a0&&t),!o.has(0)&&n&&i.appendChild(new u(0)),i},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){ +for(var t=this._token;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){var n=this._scanner.next();if(0!==n.type&&4!==n.type&&5!==n.type)return!1}this._token=this._scanner.next()}var i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new s(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new u(Number(t)):new p(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token +;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var i=new u(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new s("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(var o=new d;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(o),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];2!==this._token.type&&7!==this._token.type;){var i=void 0;if(!(i=(i=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(i)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new s(n.join(""))),!0)}, +e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var i=new p(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new s("${"+t+":")),i.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new c,n="",i="";!this._accept(6);){var o=void 0;if(o=this._accept(5,!0))n+=o=this._accept(6,!0)||o;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);){o=void 0;if(o=this._accept(5,!0))o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new s(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){ +return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new h(Number(i))),!0;if(this._accept(4))return e.appendChild(new h(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var o=this._accept(9,!0);return o&&this._accept(4)?(e.appendChild(new h(Number(i),o)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new h(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new h(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){var r;if(r=this._until(1))if(s=this._until(4))return e.appendChild(new h(Number(i),void 0,r,s)),!0}else{var s;if(s=this._until(4))return e.appendChild(new h(Number(i),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){ +return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}();t.SnippetParser=m})),define(n[388],i([0,1,61,5]),(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){this.leadingLineContent=e,this.characterCountDelta=t};t.LineContext=o;var r=function(){function e(t,n,i,o,r,s){this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._wordDistance=o,this._options=r,this._refilterKind=1,this._lineContext=i,"top"===s?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===s&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return Object.defineProperty(e.prototype,"lineContext",{get:function(){return this._lineContext},set:function(e){ +this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?n.fuzzyScore:n.fuzzyScoreGracefulAggressive,d=0;d=p)c.score=n.FuzzyScore.Default;else if("string"==typeof c.completion.filterText){if(!(m=u(r,s,f,c.completion.filterText,c.filterTextLow,0,!1)))continue +;0===i.compareIgnoreCase(c.completion.filterText,c.completion.label)?c.score=m:(c.score=n.anyScore(r,s,f,c.completion.label,c.labelLow,0),c.score[0]=m[0])}else{var m;if(!(m=u(r,s,f,c.completion.label,c.labelLow,0,!1)))continue;c.score=m}}switch(c.idx=d,c.distance=this._wordDistance.distance(c.position,c.completion),l.push(c),this._stats.suggestionCount++,c.completion.kind){case 25:this._stats.snippetCount++;break;case 18:this._stats.textCount++}}this._filteredItems=l.sort(this._snippetCompareFn),this._refilterKind=0},e._compareCompletionItems=function(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.completion.kind!==n.completion.kind){if(25===t.completion.kind)return 1;if(25===n.completion.kind)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.completion.kind!==n.completion.kind){ +if(25===t.completion.kind)return-1;if(25===n.completion.kind)return 1}return e._compareCompletionItems(t,n)},e}();t.CompletionModel=r})),define(n[389],i([0,1,19,2,78]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){var o=this;this._disposables=new i.DisposableStore,this._disposables.add(t.onDidShow((function(){return o._onItem(t.getFocusedItem())}))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((function(i){if(o._active&&!t.isFrozen()){var r=i.charCodeAt(i.length-1);o._active.acceptCharacters.has(r)&&e.getOption(0)&&n(o._active.item)}})))}return e.prototype._onItem=function(e){if(e&&n.isNonEmptyArray(e.item.completion.commitCharacters)){if(!this._active||this._active.item.item!==e.item){for(var t=new o.CharacterSet,i=0,r=e.item.completion.commitCharacters;i0&&t.add(s.charCodeAt(0))}this._active={ +acceptCharacters:t,item:e}}}else this.reset()},e.prototype.reset=function(){this._active=void 0},e.prototype.dispose=function(){this._disposables.dispose()},e}();t.CommitCharacterController=r})),define(n[390],i([0,1,2,3,4,51]),(function(e,t,n,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){var t=this;this._controller=e,this._disposables=new n.DisposableStore,this._decorations=[],this._disposables.add(e.model.onDidSuggest((function(e){if(!e.shy){var n=t._controller.widget.getValue(),i=n.getFocusedItem();i&&t._highlight(i.item),t._widgetListener||(t._widgetListener=n.onDidFocus((function(e){return t._highlight(e.item)})))}}))),this._disposables.add(e.model.onDidCancel((function(){t._reset()})))}return e.prototype.dispose=function(){this._reset(),this._disposables.dispose(),n.dispose(this._widgetListener),n.dispose(this._shiftKeyListener)},e.prototype._reset=function(){this._decorations=this._controller.editor.deltaDecorations(this._decorations,[]), +this._shiftKeyListener&&(this._shiftKeyListener.dispose(),this._shiftKeyListener=void 0)},e.prototype._highlight=function(e){var t,n=this;this._currentItem=e;var o=this._controller.editor.getOption(85),r=[];if(o.insertHighlight){this._shiftKeyListener||(this._shiftKeyListener=l.event((function(){return n._highlight(n._currentItem)})));var s=this._controller.getOverwriteInfo(e,l.isPressed),a=this._controller.editor.getPosition();if("insert"===o.insertMode&&s.overwriteAfter>0)r=[{range:new i.Range(a.lineNumber,a.column,a.lineNumber,a.column+s.overwriteAfter),options:{inlineClassName:"suggest-insert-unexpected"}}];else if("replace"===o.insertMode&&0===s.overwriteAfter){var u=null===(t=this._controller.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(a);u&&u.endColumn>a.column&&(r=[{range:new i.Range(a.lineNumber,a.column,a.lineNumber,u.endColumn),options:{inlineClassName:"suggest-insert-unexpected"}}])}}this._decorations=this._controller.editor.deltaDecorations(this._decorations,r)},e}() +;t.SuggestRangeHighlighter=a;var l=new(function(e){function t(){var t=e.call(this)||this;return t._subscriptions=new n.DisposableStore,t._isPressed=!1,t._subscriptions.add(s.domEvent(document.body,"keydown")((function(e){return t.isPressed=e.shiftKey}))),t._subscriptions.add(s.domEvent(document.body,"keyup")((function(){return t.isPressed=!1}))),t._subscriptions.add(s.domEvent(document.body,"mouseleave")((function(){return t.isPressed=!1}))),t._subscriptions.add(s.domEvent(document.body,"blur")((function(){return t.isPressed=!1}))),t}return r(t,e),Object.defineProperty(t.prototype,"isPressed",{get:function(){return this._isPressed},set:function(e){this._isPressed!==e&&(this._isPressed=e,this.fire(e))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._subscriptions.dispose(),e.prototype.dispose.call(this)},t}(o.Emitter))})),define(n[391],i([0,1,19,3,198]),(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){} +return e.create=function(t,s){return d(this,void 0,void 0,(function(){var a,l,u,d;return c(this,(function(c){switch(c.label){case 0:return s.getOption(85).localityBonus&&s.hasModel()?(a=s.getModel(),l=s.getPosition(),t.canComputeWordRanges(a.uri)?[4,(new o.BracketSelectionRangeProvider).provideSelectionRanges(a,[l])]:[2,e.None]):[2,e.None];case 1:return(u=c.sent())&&0!==u.length&&0!==u[0].length?[4,t.computeWordRanges(a.uri,u[0][0].range)]:[2,e.None];case 2:return d=c.sent(),[2,new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.distance=function(e,t){if(!d||!l.equals(s.getPosition()))return 0;if(17===t.kind)return 2<<20;var o=t.label,r=d[o];if(n.isFalsyOrEmpty(r))return 2<<20;for(var a=n.binarySearch(r,i.Range.fromPositions(e),i.Range.compareRangesUsingStarts),c=a>=0?r[a]:r[Math.max(0,~a-1)],h=u.length,p=0,f=u[0];p'"_]/g,"-")},t.log=function(e,t){console.log(e.languageId+": "+t)},t.createError=function(e,t){return new Error(e.languageId+": "+t)},t.substituteMatches=function(e,t,n,i,s){var a=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,l,u,d,c,h,p,f,g){return o(u)?o(d)?!o(c)&&c0;){var i=e.tokenizer[n];if(i)return i;var o=n.lastIndexOf(".");n=o<0?null:n.substr(0,o)}return null},t.stateExists=function(e,t){for(var n=t;n&&n.length>0;){if(e.stateNames[n])return!0;var i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return!1}})),define(n[392],i([0,1,199]),(function(e,t,n){"use strict";function i(e,t){return"boolean"==typeof e?e:t}function o(e,t){return"string"==typeof e?e:t}function r(e,t){void 0===t&&(t=!1),t&&(e=e.map((function(e){return e.toLowerCase()})));var n=function(e){for(var t={},n=0,i=e;n=0&&i<5;)i++,t=t.replace(/@(\w+)/g,(function(i,o){var r="";if("string"==typeof e[o])r=e[o];else{ +if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?n.createError(e,"language definition does not contain attribute '"+o+"', used at: "+t):n.createError(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return n.empty(r)?"":"(?:"+r+")"}));return new RegExp(t,e.ignoreCase?"i":"")}function a(e,t,i,o){var a=-1,l=i,u=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);u&&(u[3]&&(a=parseInt(u[3]),u[2]&&(a+=100)),l=u[4]);var d,c="~",h=l;if(l&&0!==l.length?/^\w*$/.test(h)?c="==":(u=l.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(c=u[1],h=u[2]):(c="!=",h=""),"~"!==c&&"!~"!==c||!/^(\w|\|)*$/.test(h))if("@"===c||"!@"===c){var p=e[h];if(!p)throw n.createError(e,"the @ match target '"+h+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var n=0,i=t;n=100){i-=100;var o=n.split(".");if(o.unshift(n),i0&&"^"===i[0],this.name=this.name+": "+i,this.regex=s(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")},e.prototype.setAction=function(e,t){this.action=function e(t,i,o){if(o){if("string"==typeof o)return o;if(o.token||""===o.token){if("string"!=typeof o.token)throw n.createError(t,"a 'token' attribute must be of type string, in rule: "+i);var r={token:o.token};if(o.token.indexOf("$")>=0&&(r.tokenSubst=!0),"string"==typeof o.bracket)if("@open"===o.bracket)r.bracket=1;else{if("@close"!==o.bracket)throw n.createError(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+i);r.bracket=-1}if(o.next){if("string"!=typeof o.next)throw n.createError(t,"the next state must be a string value in rule: "+i);var s=o.next +;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!n.stateExists(t,n.substituteMatches(t,s,"",[],""))))throw n.createError(t,"the next state '"+o.next+"' is not defined in rule: "+i);r.next=s}return"number"==typeof o.goBack&&(r.goBack=o.goBack),"string"==typeof o.switchTo&&(r.switchTo=o.switchTo),"string"==typeof o.log&&(r.log=o.log),"string"==typeof o.nextEmbedded&&(r.nextEmbedded=o.nextEmbedded,t.usesEmbedded=!0),r}if(Array.isArray(o)){for(var l=[],u=0,d=o.length;u=1&&h.length<=3)if(f.setRegex(s,h[0]),h.length>=3)if("string"==typeof h[1])f.setAction(s,{token:h[1],next:h[2] +});else{if("object"!=typeof h[1])throw n.createError(r,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);var g=h[1];g.next=h[2],f.setAction(s,g)}else f.setAction(s,h[1]);else{if(!h.regex)throw n.createError(r,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);h.name&&"string"==typeof h.name&&(f.name=h.name),h.matchOnlyAtStart&&(f.matchOnlyAtLineStart=i(h.matchOnlyAtLineStart,!1)),f.setRegex(s,h.regex),f.setAction(s,h.action)}o.push(f)}}}if(s.languageId=e,s.ignoreCase=r.ignoreCase,s.noThrow=r.noThrow,s.usesEmbedded=r.usesEmbedded,s.stateNames=t.tokenizer,s.defaultToken=r.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw n.createError(r,"a language definition must define the 'tokenizer' attribute as an object");for(var u in r.tokenizer=[],t.tokenizer)if(t.tokenizer.hasOwnProperty(u)){r.start||(r.start=u);var d=t.tokenizer[u];r.tokenizer[u]=new Array,a("tokenizer."+u,r.tokenizer[u],d)} +if(r.usesEmbedded=s.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw n.createError(r,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];for(var c=[],h=0,p=t.brackets;h=n.actionsList.children.length?(n.actionsList.appendChild(r),n.viewItems.push(i)):(n.actionsList.insertBefore(r,n.actionsList.children[o]),n.viewItems.splice(o,0,i),o++)}))},t.prototype.clear=function(){this.viewItems=o.dispose(this.viewItems),a.clearNode(this.actionsList)},t.prototype.isEmpty=function(){return 0===this.viewItems.length},t.prototype.focus=function(e){var t=!1,n=void 0;void 0===e?t=!0:"number"==typeof e?n=e:"boolean"==typeof e&&(t=e),t&&void 0===this.focusedItem?(this.focusedItem=this.viewItems.length-1,this.focusNext()):(void 0!==n&&(this.focusedItem=n),this.updateFocus())},t.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.viewItems.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.viewItems.length,e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled()) +;this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.viewItems.length-1),e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},t.prototype.updateFocus=function(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(var n=0;n=0){var n=-1;e.equals(17)?n=(t+1)%_.length:e.equals(15)&&(n=0===t?_.length-1:t-1),e.equals(9)?_[t].blur():n>=0&&_[n].focus(),i.EventHelper.stop(e,!0)}}}));var y=document.createElement("div");return y.className="controls",y.style.display=d._showOptionButtons?"block":"none",y.appendChild(d.caseSensitive.domNode),y.appendChild(d.wholeWords.domNode),y.appendChild(d.regex.domNode),d.domNode.appendChild(y), +t&&t.appendChild(d.domNode),d.onkeydown(d.inputBox.inputElement,(function(e){return d._onKeyDown.fire(e)})),d.onkeyup(d.inputBox.inputElement,(function(e){return d._onKeyUp.fire(e)})),d.oninput(d.inputBox.inputElement,(function(e){return d._onInput.fire()})),d.onmousedown(d.inputBox.inputElement,(function(e){return d._onMouseDown.fire(e)})),d}return r(t,e),t.prototype.enable=function(){i.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){i.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setFocusInputOnOptionClick=function(e){this.fixFocusOnOptionClickEnabled=e},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){ +this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground} +;this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){ +this.caseSensitive.checked=e},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){i.removeClass(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,i.addClass(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t}(s.Widget);t.FindInput=d})),define(n[400],i([0,1,397,8,152,46,4,135,182]),(function(e,t,n,i,o,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=n.localize(0,null),d=n.localize(1,null),c=function(e){function t(t){return e.call(this,{ +actionClassName:"codicon-preserve-case",title:d+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionBackground:t.inputActiveOptionBackground})||this}return r(t,e),t}(l.Checkbox);t.PreserveCaseCheckbox=c;var h=function(e){function t(t,n,r,s){var l=e.call(this)||this;l._showOptionButtons=r,l.fixFocusOnOptionClickEnabled=!0,l.cachedOptionsWidth=0,l._onDidOptionChange=l._register(new a.Emitter),l.onDidOptionChange=l._onDidOptionChange.event,l._onKeyDown=l._register(new a.Emitter),l.onKeyDown=l._onKeyDown.event,l._onMouseDown=l._register(new a.Emitter),l._onInput=l._register(new a.Emitter),l._onKeyUp=l._register(new a.Emitter),l._onPreserveCaseKeyDown=l._register(new a.Emitter),l.onPreserveCaseKeyDown=l._onPreserveCaseKeyDown.event,l.contextViewProvider=n,l.placeholder=s.placeholder||"",l.validation=s.validation,l.label=s.label||u,l.inputActiveOptionBorder=s.inputActiveOptionBorder,l.inputActiveOptionBackground=s.inputActiveOptionBackground, +l.inputBackground=s.inputBackground,l.inputForeground=s.inputForeground,l.inputBorder=s.inputBorder,l.inputValidationInfoBorder=s.inputValidationInfoBorder,l.inputValidationInfoBackground=s.inputValidationInfoBackground,l.inputValidationInfoForeground=s.inputValidationInfoForeground,l.inputValidationWarningBorder=s.inputValidationWarningBorder,l.inputValidationWarningBackground=s.inputValidationWarningBackground,l.inputValidationWarningForeground=s.inputValidationWarningForeground,l.inputValidationErrorBorder=s.inputValidationErrorBorder,l.inputValidationErrorBackground=s.inputValidationErrorBackground,l.inputValidationErrorForeground=s.inputValidationErrorForeground;var d=s.history||[],h=!!s.flexibleHeight,p=!!s.flexibleWidth,f=s.flexibleMaxHeight;l.domNode=document.createElement("div"),i.addClass(l.domNode,"monaco-findInput"),l.inputBox=l._register(new o.HistoryInputBox(l.domNode,l.contextViewProvider,{ariaLabel:l.label||"",placeholder:l.placeholder||"",validationOptions:{validation:l.validation}, +inputBackground:l.inputBackground,inputForeground:l.inputForeground,inputBorder:l.inputBorder,inputValidationInfoBackground:l.inputValidationInfoBackground,inputValidationInfoForeground:l.inputValidationInfoForeground,inputValidationInfoBorder:l.inputValidationInfoBorder,inputValidationWarningBackground:l.inputValidationWarningBackground,inputValidationWarningForeground:l.inputValidationWarningForeground,inputValidationWarningBorder:l.inputValidationWarningBorder,inputValidationErrorBackground:l.inputValidationErrorBackground,inputValidationErrorForeground:l.inputValidationErrorForeground,inputValidationErrorBorder:l.inputValidationErrorBorder,history:d,flexibleHeight:h,flexibleWidth:p,flexibleMaxHeight:f})),l.preserveCase=l._register(new c({appendTitle:"",isChecked:!1,inputActiveOptionBorder:l.inputActiveOptionBorder,inputActiveOptionBackground:l.inputActiveOptionBackground})),l._register(l.preserveCase.onChange((function(e){l._onDidOptionChange.fire(e),!e&&l.fixFocusOnOptionClickEnabled&&l.inputBox.focus(), +l.validate()}))),l._register(l.preserveCase.onKeyDown((function(e){l._onPreserveCaseKeyDown.fire(e)}))),l._showOptionButtons?l.cachedOptionsWidth=l.preserveCase.width():l.cachedOptionsWidth=0;var g=[l.preserveCase.domNode];l.onkeydown(l.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=g.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%g.length:e.equals(15)&&(n=0===t?g.length-1:t-1),e.equals(9)?g[t].blur():n>=0&&g[n].focus(),i.EventHelper.stop(e,!0)}}}));var m=document.createElement("div");return m.className="controls",m.style.display=l._showOptionButtons?"block":"none",m.appendChild(l.preserveCase.domNode),l.domNode.appendChild(m),t&&t.appendChild(l.domNode),l.onkeydown(l.inputBox.inputElement,(function(e){return l._onKeyDown.fire(e)})),l.onkeyup(l.inputBox.inputElement,(function(e){return l._onKeyUp.fire(e)})),l.oninput(l.inputBox.inputElement,(function(e){return l._onInput.fire()})),l.onmousedown(l.inputBox.inputElement,(function(e){return l._onMouseDown.fire(e) +})),l}return r(t,e),t.prototype.enable=function(){i.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.preserveCase.enable()},t.prototype.disable=function(){i.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.preserveCase.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder, +this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground, +inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getPreserveCase=function(){return this.preserveCase.checked},t.prototype.setPreserveCase=function(e){this.preserveCase.checked=e},t.prototype.focusOnPreserve=function(){this.preserveCase.focus()},t.prototype.validate=function(){this.inputBox&&this.inputBox.validate()},Object.defineProperty(t.prototype,"width",{set:function(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(s.Widget);t.ReplaceInput=h})),define(n[401],i([6,7]),(function(e,t){return e.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",t)})),define(n[402],i([6,7]),(function(e,t){ +return e.create("vs/base/browser/ui/list/listWidget",t)}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=0){var o=this.renderedElements[i];this.trait.unrender(n),o.index=t}else{o={index:t,templateData:n};this.renderedElements.push(o)}this.trait.renderIndex(t,n)}, +e.prototype.splice=function(e,t,n){for(var i=[],o=0,r=this.renderedElements;o=e+t&&i.push({index:s.index+n-t,templateData:s.templateData})}this.renderedElements=i},e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){var t=s.firstIndex(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),L=function(){function e(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Emitter,this.onChange=this._onChange.event}return Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new E(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){ +var i=n.length-t,o=e+t,r=a(this.sortedIndexes.filter((function(t){return t=o})).map((function(e){return e+i})));this.renderer.splice(e,t,n.length),this._set(r,r)},e.prototype.renderIndex=function(e,t){d.toggleClass(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){d.removeClass(e,this._trait)},e.prototype.set=function(e,t){return this._set(e,a(e).sort(K),t)},e.prototype._set=function(e,t,n){var i=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;var r=H(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:n}),i},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return s.binarySearch(this.sortedIndexes,e,K)>=0},e.prototype.dispose=function(){i.dispose(this._onChange)},h([u.memoize],e.prototype,"renderer",null),e}(),D=function(e){function t(){return e.call(this,"focused")||this} +return r(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),this.contains(t)?n.setAttribute("aria-selected","true"):n.removeAttribute("aria-selected")},t}(L),N=function(){function e(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.identityProvider)return this.trait.splice(e,t,n.map((function(){return!1})));var o=this.trait.get().map((function(e){return i.identityProvider.getId(i.view.element(e)).toString()})),r=n.map((function(e){return o.indexOf(i.identityProvider.getId(e).toString())>-1}));this.trait.splice(e,t,r)},e}();function x(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var I,M=function(){function e(e,t,n){this.list=e,this.view=t,this.disposables=new i.DisposableStore;var o=!1!==n.multipleSelectionSupport;this.openController=n.openController||F;var r=g.Event.chain(m.domEvent(t.domNode,"keydown")).filter((function(e){return!x(e.target)})).map((function(e){return new f.StandardKeyboardEvent(e)})) +;r.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),r.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),r.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),r.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),r.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),r.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),o&&r.filter((function(e){return(c.isMacintosh?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent), +this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(s.range(this.list.length),e.browserEvent),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables.dispose()},e}();!function(e){ +e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(I||(I={})),t.DefaultKeyboardNavigationDelegate=new(function(){function e(){}return e.prototype.mightProducePrintableCharacter=function(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)},e}());var k=function(){function e(e,t,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=o,this.enabled=!1,this.state=I.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.enabledDisposables=new i.DisposableStore,this.disposables=new i.DisposableStore,this.updateOptions(e.options)}return e.prototype.updateOptions=function(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)},e.prototype.enable=function(){var e=this;if(!this.enabled){ +var t=g.Event.chain(m.domEvent(this.view.domNode,"keydown")).filter((function(e){return!x(e.target)})).filter((function(){return e.automaticKeyboardNavigation||e.triggered})).map((function(e){return new f.StandardKeyboardEvent(e)})).filter((function(t){return e.delegate.mightProducePrintableCharacter(t)})).forEach((function(e){e.stopPropagation(),e.preventDefault()})).map((function(e){return e.browserEvent.key})).event,n=g.Event.debounce(t,(function(){return null}),800);g.Event.reduce(g.Event.any(t,n),(function(e,t){return null===t?null:(e||"")+t}))(this.onInput,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}},e.prototype.disable=function(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)},e.prototype.onInput=function(e){if(!e)return this.state=I.Idle,void(this.triggered=!1);var t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===I.Idle?1:0;this.state=I.Typing;for(var o=0;o=0&&e[o]===t-(n-o);)i.push(e[o--]);i.reverse(),o=n;for(;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]-1?t:[e]},e.prototype.getDragURI=function(e){return this.dnd.getDragURI(e)},e.prototype.getDragLabel=function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)},e.prototype.onDragStart=function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)},e.prototype.onDragOver=function(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}, +e.prototype.onDragEnd=function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)},e.prototype.drop=function(e,t,n,i){this.dnd.drop(e,t,n,i)},e}(),G=function(){function e(e,o,r,s,u){void 0===u&&(u=z),this.user=e,this._options=u,this.eventBufferer=new g.EventBufferer,this.disposables=new i.DisposableStore,this._onDidOpen=new g.Emitter,this.onDidOpen=this._onDidOpen.event,this._onDidPin=new g.Emitter,this.didJustPressContextMenuKey=!1,this._onDidDispose=new g.Emitter,this.onDidDispose=this._onDidDispose.event,this.focus=new D,this.selection=new L("selected"),C.mixin(u,B,!1);var c=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=u.accessibilityProvider,this.accessibilityProvider&&(c.push(new j(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map((function(e){return new U(e.templateId,a(c,[e]))}));var h=l(l({},u),{dnd:u.dnd&&new q(this,u.dnd)}) +;if(this.view=new _.ListView(o,r,s,h),"string"!=typeof u.ariaRole?this.view.domNode.setAttribute("role",v.ListAriaRootRole.TREE):this.view.domNode.setAttribute("role",u.ariaRole),u.styleController)this.styleController=u.styleController(this.view.domId);else{var p=d.createStyleSheet(this.view.domNode);this.styleController=new V(p,this.view.domId)}if(this.spliceable=new b.CombinedSpliceable([new N(this.focus,this.view,u.identityProvider),new N(this.selection,this.view,u.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=g.Event.map(m.domEvent(this.view.domNode,"focus",!0),(function(){return null})),this.onDidBlur=g.Event.map(m.domEvent(this.view.domNode,"blur",!0),(function(){return null})),this.disposables.add(new T(this,this.view)),"boolean"!=typeof u.keyboardSupport||u.keyboardSupport){var f=new M(this,this.view,u);this.disposables.add(f)} +if(u.keyboardNavigationLabelProvider){var y=u.keyboardNavigationDelegate||t.DefaultKeyboardNavigationDelegate;this.typeLabelController=new k(this,this.view,u.keyboardNavigationLabelProvider,y),this.disposables.add(this.typeLabelController)}this.disposables.add(this.createMouseController(u)),this.onFocusChange(this._onFocusChange,this,this.disposables),this.onSelectionChange(this._onSelectionChange,this,this.disposables),u.ariaLabel&&this.view.domNode.setAttribute("aria-label",n.localize(0,null,u.ariaLabel))}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return g.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),(function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return g.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),(function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domId",{get:function(){ +return this.view.domId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){return this.view.onMouseClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){return this.view.onMouseDblClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMiddleClick",{get:function(){return this.view.onMouseMiddleClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){return this.view.onMouseDown},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){return this.view.onTouchStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){return this.view.onTap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=g.Event.chain(m.domEvent(this.view.domNode,"keydown")).map((function(e){return new f.StandardKeyboardEvent(e) +})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,n=g.Event.chain(m.domEvent(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.getFocus().length>0&&!!e.view.domElement(e.getFocus()[0])})).map((function(t){var n=e.getFocus()[0];return{index:n,element:e.view.element(n),anchor:e.view.domElement(n),browserEvent:t}})).event,i=g.Event.chain(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY},browserEvent:i}})).event;return g.Event.any(t,n,i)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyDown",{get:function(){return m.domEvent(this.view.domNode,"keydown")},enumerable:!0,configurable:!0}), +e.prototype.createMouseController=function(e){return new W(this)},e.prototype.updateOptions=function(e){void 0===e&&(e={}),this._options=l(l({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options)},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;if(void 0===n&&(n=[]),e<0||e>this.view.length)throw new v.ListError(this.user,"Invalid start index: "+e);if(t<0)throw new v.ListError(this.user,"Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents((function(){return i.spliceable.splice(e,t,n)}))},e.prototype.rerender=function(){this.view.rerender()},e.prototype.element=function(e){return this.view.element(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.contentHeight},enumerable:!0, +configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.view.domNode.focus()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.setSelection=function(e,t){for(var n=0,i=e;n=this.length)throw new v.ListError(this.user,"Invalid index "+o)}this.selection.set(e,t)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.getSelectedElements=function(){var e=this;return this.getSelection().map((function(t){return e.view.element(t)}))},e.prototype.setFocus=function(e,t){for(var n=0,i=e;n=this.length)throw new v.ListError(this.user,"Invalid index "+o)}this.focus.set(e,t)},e.prototype.focusNext=function(e,t,n,i){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,i) +;r>-1&&this.setFocus([r],n)}},e.prototype.focusPrevious=function(e,t,n,i){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,i);r>-1&&this.setFocus([r],n)}},e.prototype.focusNextPage=function(e,t){var n=this,i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;var o=this.view.element(i),r=this.getFocusedElements()[0];if(r!==o){var s=this.findPreviousIndex(i,!1,t);s>-1&&r!==this.view.element(s)?this.setFocus([s],e):this.setFocus([i],e)}else{var a=this.view.getScrollTop();this.view.setScrollTop(a+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==a&&setTimeout((function(){return n.focusNextPage(e,t)}),0)}},e.prototype.focusPreviousPage=function(e,t){var n,i=this,o=this.view.getScrollTop();n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var r=this.view.element(n),s=this.getFocusedElements()[0];if(s!==r){var a=this.findNextIndex(n,!1,t) +;a>-1&&s!==this.view.element(a)?this.setFocus([a],e):this.setFocus([n],e)}else{var l=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==l&&setTimeout((function(){return i.focusPreviousPage(e,t)}),0)}},e.prototype.focusLast=function(e,t){if(0!==this.length){var n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}},e.prototype.focusFirst=function(e,t){if(0!==this.length){var n=this.findNextIndex(0,!1,t);n>-1&&this.setFocus([n],e)}},e.prototype.findNextIndex=function(e,t,n){void 0===t&&(t=!1);for(var i=0;i=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1},e.prototype.findPreviousIndex=function(e,t,n){void 0===t&&(t=!1);for(var i=0;i=this.length)throw new v.ListError(this.user,"Invalid index "+e);var n=this.view.getScrollTop(),i=this.view.elementTop(e),r=this.view.elementHeight(e);if(o.isNumber(t)){var s=r-this.view.renderHeight;this.view.setScrollTop(s*S.clamp(t,0,1)+i)}else{var a=i+r,l=n+this.view.renderHeight;i=l||(i=l&&this.view.setScrollTop(a-this.view.renderHeight))}},e.prototype.getRelativeTop=function(e){if(e<0||e>=this.length)throw new v.ListError(this.user,"Invalid index "+e);var t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(nt+this.view.renderHeight)return null;var o=i-this.view.renderHeight;return Math.abs((t-n)/o)},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,o=e;i=this.length)throw new v.ListError(this.user,"Invalid index "+r)} +this._onDidOpen.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e,t){for(var n=this,i=0,o=e;i=this.length)throw new v.ListError(this.user,"Invalid index "+r)}this._onDidPin.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,n=e.indexes,i=e.browserEvent;return{indexes:n,elements:n.map((function(e){return t.view.element(e)})),browserEvent:i}},e.prototype._onFocusChange=function(){var e=this.focus.get();d.toggleClass(this.view.domNode,"element-focused",e.length>0),this.onDidChangeActiveDescendant()},e.prototype.onDidChangeActiveDescendant=function(){var e,t=this.focus.get();if(t.length>0){var n=void 0;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))), +this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")},e.prototype._onSelectionChange=function(){var e=this.selection.get();d.toggleClass(this.view.domNode,"selection-none",0===e.length),d.toggleClass(this.view.domNode,"selection-single",1===e.length),d.toggleClass(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidOpen.dispose(),this._onDidPin.dispose(),this._onDidDispose.dispose()},h([u.memoize],e.prototype,"onFocusChange",null),h([u.memoize],e.prototype,"onSelectionChange",null),h([u.memoize],e.prototype,"onContextMenu",null),e}();t.List=G})),define(n[403],i([6,7]),(function(e,t){return e.create("vs/base/browser/ui/menu/menu",t)}));a=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t1){var i=n.shift();i&&i.container&&(o.focusItemByElement(i.container),n.push(i)),o.mnemonics.set(t,n)}}}))),p.isLinux&&o._register(l.addDisposableListener(r,l.EventType.KEY_DOWN,(function(e){var t=new u.StandardKeyboardEvent(e);t.equals(14)||t.equals(11)?(o.focusedItem=o.viewItems.length-1,o.focusNext(),l.EventHelper.stop(e,!0)):(t.equals(13)||t.equals(12))&&(o.focusedItem=0, +o.focusPrevious(),l.EventHelper.stop(e,!0))}))),o._register(l.addDisposableListener(o.domNode,l.EventType.MOUSE_OUT,(function(e){var t=e.relatedTarget;l.isAncestor(t,o.domNode)||(o.focusedItem=void 0,o.updateFocus(),e.stopPropagation())}))),o._register(l.addDisposableListener(o.actionsList,l.EventType.MOUSE_OVER,(function(e){var t=e.target;if(t&&l.isAncestor(t,o.actionsList)&&t!==o.actionsList){for(;t.parentElement!==o.actionsList&&null!==t.parentElement;)t=t.parentElement;if(l.hasClass(t,"action-item")){var n=o.focusedItem;o.setFocusedItem(t),n!==o.focusedItem&&o.updateFocus()}}})));var s={parent:o};o.mnemonics=new Map,o.scrollableElement=o._register(new h.DomScrollableElement(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));var d=o.scrollableElement.getDomNode();return d.style.position="",o._register(l.addDisposableListener(d,l.EventType.MOUSE_UP,(function(e){e.preventDefault()}))), +r.style.maxHeight=Math.max(10,window.innerHeight-t.getBoundingClientRect().top-30)+"px",o.push(n,{icon:!0,label:!0,isMenu:!0}),t.appendChild(o.scrollableElement.getDomNode()),o.scrollableElement.scanDomNode(),o.viewItems.filter((function(e){return!(e instanceof y)})).forEach((function(e,t,n){e.updatePositionInSet(t+1,n.length)})),o}return r(t,e),t.prototype.style=function(e){var t=this.getContainer(),n=e.foregroundColor?""+e.foregroundColor:"",i=e.backgroundColor?""+e.backgroundColor:"",o=e.borderColor?"1px solid "+e.borderColor:"",r=e.shadowColor?"0 2px 4px "+e.shadowColor:"";t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((function(t){(t instanceof v||t instanceof y)&&t.style(e)}))},t.prototype.getContainer=function(){return this.scrollableElement.getDomNode()},Object.defineProperty(t.prototype,"onScroll",{get:function(){return this.scrollableElement.onScroll},enumerable:!0,configurable:!0}), +Object.defineProperty(t.prototype,"scrollOffset",{get:function(){return this.menuElement.scrollTop},enumerable:!0,configurable:!0}),t.prototype.focusItemByElement=function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()},t.prototype.setFocusedItem=function(e){for(var t=0;t